{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "J1w-zrxAUr4l",
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "# Read Established ScenarioNet Dataset\n",
    "\n",
    "Welcome to try out MetaDrive & ScenarioNet!\n",
    "\n",
    "For the researchers how focus on motion prediction, scenario generation, and more, you probably will not\n",
    "use the interactive environment provided by MetaDrive.\n",
    "\n",
    "In this tutorial, we will navigate you through how to read established ScenarioNet dataset and give you a sense of the data format."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "2efvTXdHVptN",
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "## Installation\n",
    "\n",
    "Note that even we only need to load the data, you still need to install MetaDrive. But no worry, it's quite easy!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 1000
    },
    "id": "65J2iQKpUQ1B",
    "outputId": "60411b22-c699-4db0-bf23-13b4c83c4d4f",
    "pycharm": {
     "name": "#%%\n"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "#@title Collect the MetaDrive & ScenarioNet\n",
    "# NOTE: If you are running this notebook locally with installtion finished, this step is not required.\n",
    "RunningInCOLAB = 'google.colab' in str(get_ipython()) # Detect if it is running in Colab\n",
    "if RunningInCOLAB:\n",
    "    %pip install git+https://github.com/metadriverse/metadrive.git\n",
    "    %pip install git+https://github.com/metadriverse/scenarionet.git"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Next, let's create a 2D visualization tool for recording the scenario in GIF."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "pygame 2.5.2 (SDL 2.28.2, Python 3.9.18)\n",
      "Hello from the pygame community. https://www.pygame.org/contribute.html\n"
     ]
    }
   ],
   "source": [
    "# visualization\n",
    "from IPython.display import Image as IImage\n",
    "import pygame\n",
    "import numpy as np\n",
    "from PIL import Image\n",
    "\n",
    "def make_GIF(frames, name=\"demo.gif\"):\n",
    "    print(\"Generate gif...\")\n",
    "    imgs = [frame for frame in frames]\n",
    "    imgs = [Image.fromarray(img) for img in imgs]\n",
    "    imgs[0].save(name, save_all=True, append_images=imgs[1:], duration=50, loop=0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Configuration\n",
    "\n",
    "Let's import some modules and specify the dataset directory."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Fail to pull. Assets already exists, version: 0.4.1.2. Expected version: 0.4.1.2. To overwrite existing assets and update, add flag '--update' and rerun this script\n"
     ]
    }
   ],
   "source": [
    "#@title Make some configurations and import some modules\n",
    "from metadrive.engine.engine_utils import close_engine\n",
    "close_engine()\n",
    "from metadrive.pull_asset import pull_asset\n",
    "pull_asset(False)\n",
    "# NOTE: usually you don't need the above lines. It is only for avoiding a potential bug when running on colab\n",
    "\n",
    "from metadrive.engine.asset_loader import AssetLoader\n",
    "from metadrive.policy.replay_policy import ReplayEgoCarPolicy\n",
    "from metadrive.envs.scenario_env import ScenarioEnv\n",
    "import os\n",
    "\n",
    "os.environ[\"SDL_VIDEODRIVER\"] = \"dummy\" # Hide the pygame window"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We prepare two demo datasets, splitting from Waymo Open Dataset and nuScenes Dataset. Here we demonstrate the files structure:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['sd_training.tfrecord-00000-of-01000_c403d5992cab9e0.pkl',\n",
       " 'dataset_summary.pkl',\n",
       " 'sd_training.tfrecord-00000-of-01000_2a1e44d405a6833f.pkl',\n",
       " 'sd_training.tfrecord-00000-of-01000_8a346109094cd5aa.pkl']"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "waymo_data =  AssetLoader.file_path(AssetLoader.asset_path, \"waymo\", unix_style=False) # Use the built-in datasets with simulator\n",
    "os.listdir(waymo_data) # there are 3 waymo scenario file with a 'dataset_summary.pkl'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['dataset_summary.pkl',\n",
       " 'nuscenes_3',\n",
       " 'nuscenes_6',\n",
       " 'dataset_mapping.pkl',\n",
       " 'nuscenes_0',\n",
       " 'nuscenes_5',\n",
       " 'nuscenes_7',\n",
       " 'nuscenes_1',\n",
       " 'nuscenes_4',\n",
       " 'nuscenes_2']"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nuscenes_data =  AssetLoader.file_path(AssetLoader.asset_path, \"nuscenes\", unix_style=False) # Use the built-in datasets with simulator\n",
    "os.listdir(nuscenes_data) # there are 10 nuscenes scenario file with a 'dataset_summary.pkl' and a 'dataset_summary.pkl'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "\n",
    "## Read Data Easily with Scenario Description\n",
    "\n",
    "A established ScenarioNet dataset is a folder containing `dataset_mapping.pkl` and `dataset_summary.pkl`. `dataset_mapping.pkl` contains the mapping from the scenario ID to the relative path. `dataset_summary.pkl` summarizes the meta information for each scenario.\n",
    "\n",
    "You can find that for the Waymo dataset, as we put all scenarios in the same folder, we don't need the `dataset_mapping.pkl` that routes scenario ID to corresponding `.pkl` file. In the nuScenes dataset, we have both `dataset_mapping.pkl` and `dataset_summary.pkl` because we have a hierachy file structure to store the scenarios.\n",
    "\n",
    "In this section, we demonstrate how to use the utilities from MetaDrive to easily access scenarios.\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "from scenarionet import read_dataset_summary, read_scenario"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Read the dataset summary"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\u001B[0;31mSignature:\u001B[0m \u001B[0mread_dataset_summary\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0mdataset_path\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n",
       "\u001B[0;31mDocstring:\u001B[0m\n",
       "Read the dataset and return the metadata of each scenario in this dataset.\n",
       "\n",
       "Args:\n",
       "    dataset_path: the path to the root folder of your dataset.\n",
       "\n",
       "Returns:\n",
       "    A tuple of three elements:\n",
       "    1) the summary dict mapping from scenario ID to its metadata,\n",
       "    2) the list of all scenarios IDs, and\n",
       "    3) a dict mapping from scenario IDs to the folder that hosts their files.\n",
       "\u001B[0;31mFile:\u001B[0m      ~/scenarionet/scenarionet/common_utils.py\n",
       "\u001B[0;31mType:\u001B[0m      function"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "read_dataset_summary?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "dataset_summary, scenario_ids, mapping = read_dataset_summary(dataset_path=waymo_data)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`dataset_summary` is the summary dict mapping from scenario ID to its metadata."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'sd_training.tfrecord-00000-of-01000_2a1e44d405a6833f.pkl': {'coordinate': 'waymo',\n",
       "  'ts': [0.0,\n",
       "   0.09997999668121338,\n",
       "   0.19995999336242676,\n",
       "   0.2999500036239624,\n",
       "   0.39994001388549805,\n",
       "   0.49990999698638916,\n",
       "   0.5999400019645691,\n",
       "   0.6999300122261047,\n",
       "   0.7999500036239624,\n",
       "   0.8999699950218201,\n",
       "   0.9999899864196777,\n",
       "   1.0999799966812134,\n",
       "   1.2000000476837158,\n",
       "   1.3000199794769287,\n",
       "   1.4000099897384644,\n",
       "   1.5,\n",
       "   1.5999799966812134,\n",
       "   1.699970006942749,\n",
       "   1.7999399900436401,\n",
       "   1.899940013885498,\n",
       "   1.999959945678711,\n",
       "   2.099950075149536,\n",
       "   2.1999800205230713,\n",
       "   2.299999952316284,\n",
       "   2.4000298976898193,\n",
       "   2.5000200271606445,\n",
       "   2.600029945373535,\n",
       "   2.7000200748443604,\n",
       "   2.8000400066375732,\n",
       "   2.9000399112701416,\n",
       "   3.0000100135803223,\n",
       "   3.099950075149536,\n",
       "   3.199889898300171,\n",
       "   3.299799919128418,\n",
       "   3.3996999263763428,\n",
       "   3.49960994720459,\n",
       "   3.5995099544525146,\n",
       "   3.6994199752807617,\n",
       "   3.799370050430298,\n",
       "   3.899280071258545,\n",
       "   3.9991800785064697,\n",
       "   4.099140167236328,\n",
       "   4.199049949645996,\n",
       "   4.2989702224731445,\n",
       "   4.3988800048828125,\n",
       "   4.49875020980835,\n",
       "   4.598659992218018,\n",
       "   4.6985602378845215,\n",
       "   4.798439979553223,\n",
       "   4.898359775543213,\n",
       "   4.99822998046875,\n",
       "   5.098139762878418,\n",
       "   5.198019981384277,\n",
       "   5.297900199890137,\n",
       "   5.397799968719482,\n",
       "   5.497710227966309,\n",
       "   5.597620010375977,\n",
       "   5.6975297927856445,\n",
       "   5.79748010635376,\n",
       "   5.897429943084717,\n",
       "   5.997379779815674,\n",
       "   6.097360134124756,\n",
       "   6.197360038757324,\n",
       "   6.29734992980957,\n",
       "   6.397369861602783,\n",
       "   6.497399806976318,\n",
       "   6.59745979309082,\n",
       "   6.697490215301514,\n",
       "   6.7975897789001465,\n",
       "   6.89762020111084,\n",
       "   6.997680187225342,\n",
       "   7.0977301597595215,\n",
       "   7.197800159454346,\n",
       "   7.297900199890137,\n",
       "   7.3979902267456055,\n",
       "   7.498089790344238,\n",
       "   7.598219871520996,\n",
       "   7.698319911956787,\n",
       "   7.798389911651611,\n",
       "   7.898489952087402,\n",
       "   7.998549938201904,\n",
       "   8.098609924316406,\n",
       "   8.19867992401123,\n",
       "   8.29874038696289,\n",
       "   8.39879035949707,\n",
       "   8.498820304870605,\n",
       "   8.59887981414795,\n",
       "   8.69890022277832,\n",
       "   8.798930168151855,\n",
       "   8.89896011352539,\n",
       "   8.998979568481445],\n",
       "  'metadrive_processed': False,\n",
       "  'sdc_id': '1629',\n",
       "  'dataset': 'waymo',\n",
       "  'scenario_id': '2a1e44d405a6833f',\n",
       "  'source_file': 'training.tfrecord-00000-of-01000',\n",
       "  'track_length': 91,\n",
       "  'current_time_index': 10,\n",
       "  'sdc_track_index': 210,\n",
       "  'objects_of_interest': ['490', '333'],\n",
       "  'tracks_to_predict': {'333': {'track_index': 3,\n",
       "    'track_id': '333',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '490': {'track_index': 49,\n",
       "    'track_id': '490',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '752': {'track_index': 183,\n",
       "    'track_id': '752',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'PEDESTRIAN'},\n",
       "   '1624': {'track_index': 208,\n",
       "    'track_id': '1624',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'CYCLIST'},\n",
       "   '332': {'track_index': 2,\n",
       "    'track_id': '332',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '469': {'track_index': 41,\n",
       "    'track_id': '469',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '507': {'track_index': 60,\n",
       "    'track_id': '507',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'}},\n",
       "  'object_summary': {'sdc': {'type': 'VEHICLE',\n",
       "    'object_id': '1629',\n",
       "    'track_length': 91,\n",
       "    'distance': 84.20105910301208,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '325': {'type': 'VEHICLE',\n",
       "    'object_id': '325',\n",
       "    'track_length': 91,\n",
       "    'distance': 2.7487233877182007,\n",
       "    'valid_length': 3,\n",
       "    'continuous_valid_length': 2},\n",
       "   '327': {'type': 'VEHICLE',\n",
       "    'object_id': '327',\n",
       "    'track_length': 91,\n",
       "    'distance': 5.598679721355438,\n",
       "    'valid_length': 15,\n",
       "    'continuous_valid_length': 15},\n",
       "   '332': {'type': 'VEHICLE',\n",
       "    'object_id': '332',\n",
       "    'track_length': 91,\n",
       "    'distance': 103.90164065361023,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '333': {'type': 'VEHICLE',\n",
       "    'object_id': '333',\n",
       "    'track_length': 91,\n",
       "    'distance': 111.29066771268845,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '336': {'type': 'VEHICLE',\n",
       "    'object_id': '336',\n",
       "    'track_length': 91,\n",
       "    'distance': 5.664326503872871,\n",
       "    'valid_length': 23,\n",
       "    'continuous_valid_length': 21},\n",
       "   '337': {'type': 'VEHICLE',\n",
       "    'object_id': '337',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 43,\n",
       "    'continuous_valid_length': 43},\n",
       "   '339': {'type': 'VEHICLE',\n",
       "    'object_id': '339',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 55,\n",
       "    'continuous_valid_length': 55},\n",
       "   '341': {'type': 'VEHICLE',\n",
       "    'object_id': '341',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 34,\n",
       "    'continuous_valid_length': 34},\n",
       "   '342': {'type': 'VEHICLE',\n",
       "    'object_id': '342',\n",
       "    'track_length': 91,\n",
       "    'distance': 113.51009303331375,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '349': {'type': 'VEHICLE',\n",
       "    'object_id': '349',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 2,\n",
       "    'continuous_valid_length': 2},\n",
       "   '352': {'type': 'VEHICLE',\n",
       "    'object_id': '352',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 9,\n",
       "    'continuous_valid_length': 5},\n",
       "   '353': {'type': 'VEHICLE',\n",
       "    'object_id': '353',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 1,\n",
       "    'continuous_valid_length': 1},\n",
       "   '354': {'type': 'VEHICLE',\n",
       "    'object_id': '354',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 66,\n",
       "    'continuous_valid_length': 66},\n",
       "   '365': {'type': 'VEHICLE',\n",
       "    'object_id': '365',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 3,\n",
       "    'continuous_valid_length': 2},\n",
       "   '368': {'type': 'VEHICLE',\n",
       "    'object_id': '368',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 5,\n",
       "    'continuous_valid_length': 5},\n",
       "   '371': {'type': 'VEHICLE',\n",
       "    'object_id': '371',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 31,\n",
       "    'continuous_valid_length': 2},\n",
       "   '375': {'type': 'VEHICLE',\n",
       "    'object_id': '375',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.276842713356018,\n",
       "    'valid_length': 4,\n",
       "    'continuous_valid_length': 4},\n",
       "   '376': {'type': 'VEHICLE',\n",
       "    'object_id': '376',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 29,\n",
       "    'continuous_valid_length': 3},\n",
       "   '378': {'type': 'VEHICLE',\n",
       "    'object_id': '378',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.8214730098843575,\n",
       "    'valid_length': 29,\n",
       "    'continuous_valid_length': 12},\n",
       "   '381': {'type': 'VEHICLE',\n",
       "    'object_id': '381',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 26,\n",
       "    'continuous_valid_length': 14},\n",
       "   '385': {'type': 'VEHICLE',\n",
       "    'object_id': '385',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 1,\n",
       "    'continuous_valid_length': 1},\n",
       "   '387': {'type': 'VEHICLE',\n",
       "    'object_id': '387',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 24,\n",
       "    'continuous_valid_length': 8},\n",
       "   '396': {'type': 'VEHICLE',\n",
       "    'object_id': '396',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 76,\n",
       "    'continuous_valid_length': 76},\n",
       "   '400': {'type': 'VEHICLE',\n",
       "    'object_id': '400',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 6,\n",
       "    'continuous_valid_length': 4},\n",
       "   '417': {'type': 'VEHICLE',\n",
       "    'object_id': '417',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 32,\n",
       "    'continuous_valid_length': 1},\n",
       "   '419': {'type': 'VEHICLE',\n",
       "    'object_id': '419',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 11},\n",
       "   '421': {'type': 'VEHICLE',\n",
       "    'object_id': '421',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 10},\n",
       "   '422': {'type': 'VEHICLE',\n",
       "    'object_id': '422',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 10},\n",
       "   '428': {'type': 'VEHICLE',\n",
       "    'object_id': '428',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 22,\n",
       "    'continuous_valid_length': 17},\n",
       "   '431': {'type': 'VEHICLE',\n",
       "    'object_id': '431',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.1140524987131357,\n",
       "    'valid_length': 55,\n",
       "    'continuous_valid_length': 55},\n",
       "   '432': {'type': 'VEHICLE',\n",
       "    'object_id': '432',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.7980888915481046,\n",
       "    'valid_length': 51,\n",
       "    'continuous_valid_length': 51},\n",
       "   '437': {'type': 'VEHICLE',\n",
       "    'object_id': '437',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 7,\n",
       "    'continuous_valid_length': 3},\n",
       "   '446': {'type': 'VEHICLE',\n",
       "    'object_id': '446',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.6166307427920401,\n",
       "    'valid_length': 19,\n",
       "    'continuous_valid_length': 19},\n",
       "   '451': {'type': 'VEHICLE',\n",
       "    'object_id': '451',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 60,\n",
       "    'continuous_valid_length': 59},\n",
       "   '452': {'type': 'VEHICLE',\n",
       "    'object_id': '452',\n",
       "    'track_length': 91,\n",
       "    'distance': 6.6010882165282965,\n",
       "    'valid_length': 52,\n",
       "    'continuous_valid_length': 51},\n",
       "   '455': {'type': 'VEHICLE',\n",
       "    'object_id': '455',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 1,\n",
       "    'continuous_valid_length': 1},\n",
       "   '457': {'type': 'VEHICLE',\n",
       "    'object_id': '457',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.823718479485251,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '458': {'type': 'VEHICLE',\n",
       "    'object_id': '458',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 70,\n",
       "    'continuous_valid_length': 67},\n",
       "   '460': {'type': 'VEHICLE',\n",
       "    'object_id': '460',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 4,\n",
       "    'continuous_valid_length': 4},\n",
       "   '464': {'type': 'VEHICLE',\n",
       "    'object_id': '464',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 3,\n",
       "    'continuous_valid_length': 2},\n",
       "   '466': {'type': 'VEHICLE',\n",
       "    'object_id': '466',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 1,\n",
       "    'continuous_valid_length': 1},\n",
       "   '469': {'type': 'VEHICLE',\n",
       "    'object_id': '469',\n",
       "    'track_length': 91,\n",
       "    'distance': 7.551295776618645,\n",
       "    'valid_length': 67,\n",
       "    'continuous_valid_length': 67},\n",
       "   '471': {'type': 'VEHICLE',\n",
       "    'object_id': '471',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 8,\n",
       "    'continuous_valid_length': 4},\n",
       "   '472': {'type': 'VEHICLE',\n",
       "    'object_id': '472',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 5,\n",
       "    'continuous_valid_length': 5},\n",
       "   '475': {'type': 'VEHICLE',\n",
       "    'object_id': '475',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 4,\n",
       "    'continuous_valid_length': 4},\n",
       "   '480': {'type': 'VEHICLE',\n",
       "    'object_id': '480',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 4,\n",
       "    'continuous_valid_length': 2},\n",
       "   '484': {'type': 'VEHICLE',\n",
       "    'object_id': '484',\n",
       "    'track_length': 91,\n",
       "    'distance': 9.533195000141859,\n",
       "    'valid_length': 39,\n",
       "    'continuous_valid_length': 1},\n",
       "   '485': {'type': 'VEHICLE',\n",
       "    'object_id': '485',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 10},\n",
       "   '487': {'type': 'VEHICLE',\n",
       "    'object_id': '487',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 55,\n",
       "    'continuous_valid_length': 16},\n",
       "   '490': {'type': 'VEHICLE',\n",
       "    'object_id': '490',\n",
       "    'track_length': 91,\n",
       "    'distance': 34.23079764936119,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '493': {'type': 'VEHICLE',\n",
       "    'object_id': '493',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 7,\n",
       "    'continuous_valid_length': 7},\n",
       "   '495': {'type': 'VEHICLE',\n",
       "    'object_id': '495',\n",
       "    'track_length': 91,\n",
       "    'distance': 14.006807163357735,\n",
       "    'valid_length': 44,\n",
       "    'continuous_valid_length': 44},\n",
       "   '496': {'type': 'VEHICLE',\n",
       "    'object_id': '496',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 68,\n",
       "    'continuous_valid_length': 33},\n",
       "   '497': {'type': 'VEHICLE',\n",
       "    'object_id': '497',\n",
       "    'track_length': 91,\n",
       "    'distance': 15.832195341587067,\n",
       "    'valid_length': 22,\n",
       "    'continuous_valid_length': 22},\n",
       "   '500': {'type': 'VEHICLE',\n",
       "    'object_id': '500',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 89,\n",
       "    'continuous_valid_length': 27},\n",
       "   '501': {'type': 'VEHICLE',\n",
       "    'object_id': '501',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 9},\n",
       "   '502': {'type': 'VEHICLE',\n",
       "    'object_id': '502',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 11},\n",
       "   '504': {'type': 'VEHICLE',\n",
       "    'object_id': '504',\n",
       "    'track_length': 91,\n",
       "    'distance': 6.018707137554884,\n",
       "    'valid_length': 80,\n",
       "    'continuous_valid_length': 80},\n",
       "   '505': {'type': 'VEHICLE',\n",
       "    'object_id': '505',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 1},\n",
       "   '506': {'type': 'VEHICLE',\n",
       "    'object_id': '506',\n",
       "    'track_length': 91,\n",
       "    'distance': 7.8919847551733255,\n",
       "    'valid_length': 49,\n",
       "    'continuous_valid_length': 49},\n",
       "   '507': {'type': 'VEHICLE',\n",
       "    'object_id': '507',\n",
       "    'track_length': 91,\n",
       "    'distance': 13.17229554709047,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '508': {'type': 'VEHICLE',\n",
       "    'object_id': '508',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 18,\n",
       "    'continuous_valid_length': 8},\n",
       "   '509': {'type': 'VEHICLE',\n",
       "    'object_id': '509',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 7,\n",
       "    'continuous_valid_length': 1},\n",
       "   '511': {'type': 'VEHICLE',\n",
       "    'object_id': '511',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 19,\n",
       "    'continuous_valid_length': 1},\n",
       "   '515': {'type': 'VEHICLE',\n",
       "    'object_id': '515',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 44,\n",
       "    'continuous_valid_length': 22},\n",
       "   '516': {'type': 'VEHICLE',\n",
       "    'object_id': '516',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 21,\n",
       "    'continuous_valid_length': 8},\n",
       "   '517': {'type': 'VEHICLE',\n",
       "    'object_id': '517',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 9,\n",
       "    'continuous_valid_length': 1},\n",
       "   '518': {'type': 'VEHICLE',\n",
       "    'object_id': '518',\n",
       "    'track_length': 91,\n",
       "    'distance': 5.325449822470546,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '519': {'type': 'VEHICLE',\n",
       "    'object_id': '519',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 18,\n",
       "    'continuous_valid_length': 10},\n",
       "   '526': {'type': 'VEHICLE',\n",
       "    'object_id': '526',\n",
       "    'track_length': 91,\n",
       "    'distance': 16.80795606970787,\n",
       "    'valid_length': 27,\n",
       "    'continuous_valid_length': 26},\n",
       "   '527': {'type': 'VEHICLE',\n",
       "    'object_id': '527',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 2},\n",
       "   '530': {'type': 'VEHICLE',\n",
       "    'object_id': '530',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 86,\n",
       "    'continuous_valid_length': 21},\n",
       "   '531': {'type': 'VEHICLE',\n",
       "    'object_id': '531',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 88,\n",
       "    'continuous_valid_length': 88},\n",
       "   '532': {'type': 'VEHICLE',\n",
       "    'object_id': '532',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 11},\n",
       "   '534': {'type': 'VEHICLE',\n",
       "    'object_id': '534',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 88,\n",
       "    'continuous_valid_length': 39},\n",
       "   '536': {'type': 'VEHICLE',\n",
       "    'object_id': '536',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 8,\n",
       "    'continuous_valid_length': 8},\n",
       "   '537': {'type': 'VEHICLE',\n",
       "    'object_id': '537',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.4888385673984885,\n",
       "    'valid_length': 5,\n",
       "    'continuous_valid_length': 5},\n",
       "   '540': {'type': 'VEHICLE',\n",
       "    'object_id': '540',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 85,\n",
       "    'continuous_valid_length': 85},\n",
       "   '542': {'type': 'VEHICLE',\n",
       "    'object_id': '542',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 1},\n",
       "   '543': {'type': 'VEHICLE',\n",
       "    'object_id': '543',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 17,\n",
       "    'continuous_valid_length': 1},\n",
       "   '544': {'type': 'VEHICLE',\n",
       "    'object_id': '544',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 16,\n",
       "    'continuous_valid_length': 1},\n",
       "   '545': {'type': 'VEHICLE',\n",
       "    'object_id': '545',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 12,\n",
       "    'continuous_valid_length': 1},\n",
       "   '546': {'type': 'VEHICLE',\n",
       "    'object_id': '546',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.6660598255693913,\n",
       "    'valid_length': 5,\n",
       "    'continuous_valid_length': 5},\n",
       "   '547': {'type': 'VEHICLE',\n",
       "    'object_id': '547',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.0082283169031143,\n",
       "    'valid_length': 5,\n",
       "    'continuous_valid_length': 5},\n",
       "   '548': {'type': 'VEHICLE',\n",
       "    'object_id': '548',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.9234367492608726,\n",
       "    'valid_length': 80,\n",
       "    'continuous_valid_length': 80},\n",
       "   '549': {'type': 'VEHICLE',\n",
       "    'object_id': '549',\n",
       "    'track_length': 91,\n",
       "    'distance': 26.11587554216385,\n",
       "    'valid_length': 37,\n",
       "    'continuous_valid_length': 36},\n",
       "   '550': {'type': 'VEHICLE',\n",
       "    'object_id': '550',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.9516869257204235,\n",
       "    'valid_length': 78,\n",
       "    'continuous_valid_length': 1},\n",
       "   '555': {'type': 'VEHICLE',\n",
       "    'object_id': '555',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 78,\n",
       "    'continuous_valid_length': 78},\n",
       "   '556': {'type': 'VEHICLE',\n",
       "    'object_id': '556',\n",
       "    'track_length': 91,\n",
       "    'distance': 31.758361959829926,\n",
       "    'valid_length': 78,\n",
       "    'continuous_valid_length': 78},\n",
       "   '557': {'type': 'VEHICLE',\n",
       "    'object_id': '557',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 41,\n",
       "    'continuous_valid_length': 1},\n",
       "   '560': {'type': 'VEHICLE',\n",
       "    'object_id': '560',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.7265744209289551,\n",
       "    'valid_length': 5,\n",
       "    'continuous_valid_length': 5},\n",
       "   '562': {'type': 'VEHICLE',\n",
       "    'object_id': '562',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 9},\n",
       "   '566': {'type': 'VEHICLE',\n",
       "    'object_id': '566',\n",
       "    'track_length': 91,\n",
       "    'distance': 9.712436974048615,\n",
       "    'valid_length': 14,\n",
       "    'continuous_valid_length': 2},\n",
       "   '568': {'type': 'VEHICLE',\n",
       "    'object_id': '568',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.843812669860199,\n",
       "    'valid_length': 73,\n",
       "    'continuous_valid_length': 73},\n",
       "   '569': {'type': 'VEHICLE',\n",
       "    'object_id': '569',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 73,\n",
       "    'continuous_valid_length': 73},\n",
       "   '570': {'type': 'VEHICLE',\n",
       "    'object_id': '570',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 19,\n",
       "    'continuous_valid_length': 1},\n",
       "   '571': {'type': 'VEHICLE',\n",
       "    'object_id': '571',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 12,\n",
       "    'continuous_valid_length': 1},\n",
       "   '572': {'type': 'VEHICLE',\n",
       "    'object_id': '572',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 19,\n",
       "    'continuous_valid_length': 2},\n",
       "   '574': {'type': 'VEHICLE',\n",
       "    'object_id': '574',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 24,\n",
       "    'continuous_valid_length': 9},\n",
       "   '576': {'type': 'VEHICLE',\n",
       "    'object_id': '576',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 10},\n",
       "   '578': {'type': 'VEHICLE',\n",
       "    'object_id': '578',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 68,\n",
       "    'continuous_valid_length': 15},\n",
       "   '579': {'type': 'VEHICLE',\n",
       "    'object_id': '579',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 10},\n",
       "   '580': {'type': 'VEHICLE',\n",
       "    'object_id': '580',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 68,\n",
       "    'continuous_valid_length': 21},\n",
       "   '581': {'type': 'VEHICLE',\n",
       "    'object_id': '581',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 22,\n",
       "    'continuous_valid_length': 21},\n",
       "   '582': {'type': 'VEHICLE',\n",
       "    'object_id': '582',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 73,\n",
       "    'continuous_valid_length': 73},\n",
       "   '583': {'type': 'VEHICLE',\n",
       "    'object_id': '583',\n",
       "    'track_length': 91,\n",
       "    'distance': 5.7331065577454865,\n",
       "    'valid_length': 68,\n",
       "    'continuous_valid_length': 1},\n",
       "   '584': {'type': 'VEHICLE',\n",
       "    'object_id': '584',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 66,\n",
       "    'continuous_valid_length': 18},\n",
       "   '585': {'type': 'VEHICLE',\n",
       "    'object_id': '585',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 23,\n",
       "    'continuous_valid_length': 23},\n",
       "   '587': {'type': 'VEHICLE',\n",
       "    'object_id': '587',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 67,\n",
       "    'continuous_valid_length': 67},\n",
       "   '591': {'type': 'VEHICLE',\n",
       "    'object_id': '591',\n",
       "    'track_length': 91,\n",
       "    'distance': 37.11683337390423,\n",
       "    'valid_length': 66,\n",
       "    'continuous_valid_length': 66},\n",
       "   '592': {'type': 'VEHICLE',\n",
       "    'object_id': '592',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 66,\n",
       "    'continuous_valid_length': 66},\n",
       "   '593': {'type': 'VEHICLE',\n",
       "    'object_id': '593',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 64,\n",
       "    'continuous_valid_length': 19},\n",
       "   '594': {'type': 'VEHICLE',\n",
       "    'object_id': '594',\n",
       "    'track_length': 91,\n",
       "    'distance': 15.813339234795421,\n",
       "    'valid_length': 66,\n",
       "    'continuous_valid_length': 66},\n",
       "   '596': {'type': 'VEHICLE',\n",
       "    'object_id': '596',\n",
       "    'track_length': 91,\n",
       "    'distance': 11.588347688317299,\n",
       "    'valid_length': 66,\n",
       "    'continuous_valid_length': 66},\n",
       "   '597': {'type': 'VEHICLE',\n",
       "    'object_id': '597',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 68,\n",
       "    'continuous_valid_length': 2},\n",
       "   '598': {'type': 'VEHICLE',\n",
       "    'object_id': '598',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 66,\n",
       "    'continuous_valid_length': 23},\n",
       "   '599': {'type': 'VEHICLE',\n",
       "    'object_id': '599',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 65,\n",
       "    'continuous_valid_length': 22},\n",
       "   '601': {'type': 'VEHICLE',\n",
       "    'object_id': '601',\n",
       "    'track_length': 91,\n",
       "    'distance': 6.672057034331374,\n",
       "    'valid_length': 64,\n",
       "    'continuous_valid_length': 64},\n",
       "   '602': {'type': 'VEHICLE',\n",
       "    'object_id': '602',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 18,\n",
       "    'continuous_valid_length': 4},\n",
       "   '603': {'type': 'VEHICLE',\n",
       "    'object_id': '603',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 23,\n",
       "    'continuous_valid_length': 16},\n",
       "   '604': {'type': 'VEHICLE',\n",
       "    'object_id': '604',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 64,\n",
       "    'continuous_valid_length': 64},\n",
       "   '606': {'type': 'VEHICLE',\n",
       "    'object_id': '606',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 63,\n",
       "    'continuous_valid_length': 1},\n",
       "   '607': {'type': 'VEHICLE',\n",
       "    'object_id': '607',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 62,\n",
       "    'continuous_valid_length': 62},\n",
       "   '608': {'type': 'VEHICLE',\n",
       "    'object_id': '608',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.405983716249466,\n",
       "    'valid_length': 6,\n",
       "    'continuous_valid_length': 6},\n",
       "   '610': {'type': 'VEHICLE',\n",
       "    'object_id': '610',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 62,\n",
       "    'continuous_valid_length': 1},\n",
       "   '612': {'type': 'VEHICLE',\n",
       "    'object_id': '612',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 12,\n",
       "    'continuous_valid_length': 12},\n",
       "   '613': {'type': 'VEHICLE',\n",
       "    'object_id': '613',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 60,\n",
       "    'continuous_valid_length': 60},\n",
       "   '615': {'type': 'VEHICLE',\n",
       "    'object_id': '615',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 58,\n",
       "    'continuous_valid_length': 58},\n",
       "   '616': {'type': 'VEHICLE',\n",
       "    'object_id': '616',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 60,\n",
       "    'continuous_valid_length': 60},\n",
       "   '617': {'type': 'VEHICLE',\n",
       "    'object_id': '617',\n",
       "    'track_length': 91,\n",
       "    'distance': 6.042413581628352,\n",
       "    'valid_length': 52,\n",
       "    'continuous_valid_length': 1},\n",
       "   '621': {'type': 'VEHICLE',\n",
       "    'object_id': '621',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 60,\n",
       "    'continuous_valid_length': 8},\n",
       "   '622': {'type': 'VEHICLE',\n",
       "    'object_id': '622',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 57,\n",
       "    'continuous_valid_length': 57},\n",
       "   '624': {'type': 'VEHICLE',\n",
       "    'object_id': '624',\n",
       "    'track_length': 91,\n",
       "    'distance': 2.07014262676239,\n",
       "    'valid_length': 8,\n",
       "    'continuous_valid_length': 8},\n",
       "   '627': {'type': 'VEHICLE',\n",
       "    'object_id': '627',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 53,\n",
       "    'continuous_valid_length': 53},\n",
       "   '628': {'type': 'VEHICLE',\n",
       "    'object_id': '628',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.25654466077685356,\n",
       "    'valid_length': 5,\n",
       "    'continuous_valid_length': 5},\n",
       "   '629': {'type': 'VEHICLE',\n",
       "    'object_id': '629',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 52,\n",
       "    'continuous_valid_length': 52},\n",
       "   '631': {'type': 'VEHICLE',\n",
       "    'object_id': '631',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 51,\n",
       "    'continuous_valid_length': 51},\n",
       "   '632': {'type': 'VEHICLE',\n",
       "    'object_id': '632',\n",
       "    'track_length': 91,\n",
       "    'distance': 15.686851650476456,\n",
       "    'valid_length': 48,\n",
       "    'continuous_valid_length': 4},\n",
       "   '634': {'type': 'VEHICLE',\n",
       "    'object_id': '634',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 48,\n",
       "    'continuous_valid_length': 48},\n",
       "   '635': {'type': 'VEHICLE',\n",
       "    'object_id': '635',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 29,\n",
       "    'continuous_valid_length': 3},\n",
       "   '637': {'type': 'VEHICLE',\n",
       "    'object_id': '637',\n",
       "    'track_length': 91,\n",
       "    'distance': 5.095191866159439,\n",
       "    'valid_length': 46,\n",
       "    'continuous_valid_length': 46},\n",
       "   '639': {'type': 'VEHICLE',\n",
       "    'object_id': '639',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 48,\n",
       "    'continuous_valid_length': 48},\n",
       "   '640': {'type': 'VEHICLE',\n",
       "    'object_id': '640',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 49,\n",
       "    'continuous_valid_length': 4},\n",
       "   '642': {'type': 'VEHICLE',\n",
       "    'object_id': '642',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 48,\n",
       "    'continuous_valid_length': 48},\n",
       "   '644': {'type': 'VEHICLE',\n",
       "    'object_id': '644',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.7224541562609375,\n",
       "    'valid_length': 39,\n",
       "    'continuous_valid_length': 2},\n",
       "   '645': {'type': 'VEHICLE',\n",
       "    'object_id': '645',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 42,\n",
       "    'continuous_valid_length': 42},\n",
       "   '646': {'type': 'VEHICLE',\n",
       "    'object_id': '646',\n",
       "    'track_length': 91,\n",
       "    'distance': 4.590390021679923,\n",
       "    'valid_length': 41,\n",
       "    'continuous_valid_length': 1},\n",
       "   '647': {'type': 'VEHICLE',\n",
       "    'object_id': '647',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 19,\n",
       "    'continuous_valid_length': 6},\n",
       "   '648': {'type': 'VEHICLE',\n",
       "    'object_id': '648',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 46,\n",
       "    'continuous_valid_length': 46},\n",
       "   '649': {'type': 'VEHICLE',\n",
       "    'object_id': '649',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 41,\n",
       "    'continuous_valid_length': 41},\n",
       "   '650': {'type': 'VEHICLE',\n",
       "    'object_id': '650',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.6701414708513767,\n",
       "    'valid_length': 38,\n",
       "    'continuous_valid_length': 5},\n",
       "   '651': {'type': 'VEHICLE',\n",
       "    'object_id': '651',\n",
       "    'track_length': 91,\n",
       "    'distance': 5.15161857008934,\n",
       "    'valid_length': 38,\n",
       "    'continuous_valid_length': 38},\n",
       "   '652': {'type': 'VEHICLE',\n",
       "    'object_id': '652',\n",
       "    'track_length': 91,\n",
       "    'distance': 14.368283748626709,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 13},\n",
       "   '654': {'type': 'VEHICLE',\n",
       "    'object_id': '654',\n",
       "    'track_length': 91,\n",
       "    'distance': 46.69343686103821,\n",
       "    'valid_length': 35,\n",
       "    'continuous_valid_length': 35},\n",
       "   '656': {'type': 'VEHICLE',\n",
       "    'object_id': '656',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 44,\n",
       "    'continuous_valid_length': 44},\n",
       "   '657': {'type': 'VEHICLE',\n",
       "    'object_id': '657',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 43,\n",
       "    'continuous_valid_length': 43},\n",
       "   '658': {'type': 'VEHICLE',\n",
       "    'object_id': '658',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 35,\n",
       "    'continuous_valid_length': 1},\n",
       "   '660': {'type': 'VEHICLE',\n",
       "    'object_id': '660',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 36,\n",
       "    'continuous_valid_length': 23},\n",
       "   '661': {'type': 'VEHICLE',\n",
       "    'object_id': '661',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 37,\n",
       "    'continuous_valid_length': 9},\n",
       "   '662': {'type': 'VEHICLE',\n",
       "    'object_id': '662',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 35,\n",
       "    'continuous_valid_length': 35},\n",
       "   '663': {'type': 'VEHICLE',\n",
       "    'object_id': '663',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 25,\n",
       "    'continuous_valid_length': 25},\n",
       "   '664': {'type': 'VEHICLE',\n",
       "    'object_id': '664',\n",
       "    'track_length': 91,\n",
       "    'distance': 21.729984641075134,\n",
       "    'valid_length': 24,\n",
       "    'continuous_valid_length': 24},\n",
       "   '665': {'type': 'VEHICLE',\n",
       "    'object_id': '665',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 31,\n",
       "    'continuous_valid_length': 31},\n",
       "   '666': {'type': 'VEHICLE',\n",
       "    'object_id': '666',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 19,\n",
       "    'continuous_valid_length': 18},\n",
       "   '667': {'type': 'VEHICLE',\n",
       "    'object_id': '667',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 30,\n",
       "    'continuous_valid_length': 1},\n",
       "   '668': {'type': 'VEHICLE',\n",
       "    'object_id': '668',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 20,\n",
       "    'continuous_valid_length': 5},\n",
       "   '669': {'type': 'VEHICLE',\n",
       "    'object_id': '669',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 29,\n",
       "    'continuous_valid_length': 29},\n",
       "   '670': {'type': 'VEHICLE',\n",
       "    'object_id': '670',\n",
       "    'track_length': 91,\n",
       "    'distance': 12.148452699184418,\n",
       "    'valid_length': 17,\n",
       "    'continuous_valid_length': 13},\n",
       "   '671': {'type': 'VEHICLE',\n",
       "    'object_id': '671',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 21,\n",
       "    'continuous_valid_length': 21},\n",
       "   '673': {'type': 'VEHICLE',\n",
       "    'object_id': '673',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 26,\n",
       "    'continuous_valid_length': 26},\n",
       "   '675': {'type': 'VEHICLE',\n",
       "    'object_id': '675',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.6272050365805626,\n",
       "    'valid_length': 15,\n",
       "    'continuous_valid_length': 15},\n",
       "   '676': {'type': 'VEHICLE',\n",
       "    'object_id': '676',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 22,\n",
       "    'continuous_valid_length': 6},\n",
       "   '677': {'type': 'VEHICLE',\n",
       "    'object_id': '677',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 24,\n",
       "    'continuous_valid_length': 24},\n",
       "   '678': {'type': 'VEHICLE',\n",
       "    'object_id': '678',\n",
       "    'track_length': 91,\n",
       "    'distance': 13.123132586479187,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 13},\n",
       "   '679': {'type': 'VEHICLE',\n",
       "    'object_id': '679',\n",
       "    'track_length': 91,\n",
       "    'distance': 10.786753237247467,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 13},\n",
       "   '680': {'type': 'VEHICLE',\n",
       "    'object_id': '680',\n",
       "    'track_length': 91,\n",
       "    'distance': 7.589548408985138,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 13},\n",
       "   '683': {'type': 'VEHICLE',\n",
       "    'object_id': '683',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 18,\n",
       "    'continuous_valid_length': 1},\n",
       "   '684': {'type': 'VEHICLE',\n",
       "    'object_id': '684',\n",
       "    'track_length': 91,\n",
       "    'distance': 12.004751324653625,\n",
       "    'valid_length': 9,\n",
       "    'continuous_valid_length': 8},\n",
       "   '685': {'type': 'VEHICLE',\n",
       "    'object_id': '685',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 12,\n",
       "    'continuous_valid_length': 1},\n",
       "   '687': {'type': 'VEHICLE',\n",
       "    'object_id': '687',\n",
       "    'track_length': 91,\n",
       "    'distance': 6.919632136821747,\n",
       "    'valid_length': 8,\n",
       "    'continuous_valid_length': 8},\n",
       "   '690': {'type': 'VEHICLE',\n",
       "    'object_id': '690',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.319422960281372,\n",
       "    'valid_length': 4,\n",
       "    'continuous_valid_length': 4},\n",
       "   '691': {'type': 'VEHICLE',\n",
       "    'object_id': '691',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 6,\n",
       "    'continuous_valid_length': 6},\n",
       "   '692': {'type': 'VEHICLE',\n",
       "    'object_id': '692',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 1,\n",
       "    'continuous_valid_length': 1},\n",
       "   '752': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '752',\n",
       "    'track_length': 91,\n",
       "    'distance': 9.990137495100498,\n",
       "    'valid_length': 70,\n",
       "    'continuous_valid_length': 70},\n",
       "   '757': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '757',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.9828233160078526,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 1},\n",
       "   '761': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '761',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.5501821283251047,\n",
       "    'valid_length': 7,\n",
       "    'continuous_valid_length': 1},\n",
       "   '763': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '763',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.8864371012896299,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 5},\n",
       "   '775': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '775',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.2418494001030922,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 11},\n",
       "   '778': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '778',\n",
       "    'track_length': 91,\n",
       "    'distance': 4.065424693748355,\n",
       "    'valid_length': 22,\n",
       "    'continuous_valid_length': 2},\n",
       "   '779': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '779',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.8515599071979523,\n",
       "    'valid_length': 17,\n",
       "    'continuous_valid_length': 16},\n",
       "   '786': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '786',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.2681039795279503,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 1},\n",
       "   '788': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '788',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.7190424352884293,\n",
       "    'valid_length': 12,\n",
       "    'continuous_valid_length': 12},\n",
       "   '789': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '789',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.802222803235054,\n",
       "    'valid_length': 9,\n",
       "    'continuous_valid_length': 9},\n",
       "   '795': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '795',\n",
       "    'track_length': 91,\n",
       "    'distance': 3.484301283955574,\n",
       "    'valid_length': 26,\n",
       "    'continuous_valid_length': 26},\n",
       "   '796': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '796',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.7422855999320745,\n",
       "    'valid_length': 24,\n",
       "    'continuous_valid_length': 24},\n",
       "   '798': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '798',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.9151662737131119,\n",
       "    'valid_length': 20,\n",
       "    'continuous_valid_length': 20},\n",
       "   '800': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '800',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.0499958880245686,\n",
       "    'valid_length': 16,\n",
       "    'continuous_valid_length': 10},\n",
       "   '802': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '802',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 1,\n",
       "    'continuous_valid_length': 1},\n",
       "   '803': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '803',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.7290306314826012,\n",
       "    'valid_length': 17,\n",
       "    'continuous_valid_length': 17},\n",
       "   '807': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '807',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.7332774251699448,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 13},\n",
       "   '808': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '808',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.7331183645874262,\n",
       "    'valid_length': 7,\n",
       "    'continuous_valid_length': 7},\n",
       "   '809': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '809',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.4187113791704178,\n",
       "    'valid_length': 15,\n",
       "    'continuous_valid_length': 15},\n",
       "   '810': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '810',\n",
       "    'track_length': 91,\n",
       "    'distance': 4.130044959485531,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 5},\n",
       "   '811': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '811',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.6255718544125557,\n",
       "    'valid_length': 4,\n",
       "    'continuous_valid_length': 4},\n",
       "   '812': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '812',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.3105508536100388,\n",
       "    'valid_length': 14,\n",
       "    'continuous_valid_length': 14},\n",
       "   '818': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '818',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.37125103222206235,\n",
       "    'valid_length': 9,\n",
       "    'continuous_valid_length': 3},\n",
       "   '825': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '825',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.36107008159160614,\n",
       "    'valid_length': 4,\n",
       "    'continuous_valid_length': 4},\n",
       "   '827': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '827',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.015506293624639511,\n",
       "    'valid_length': 2,\n",
       "    'continuous_valid_length': 2},\n",
       "   '1624': {'type': 'CYCLIST',\n",
       "    'object_id': '1624',\n",
       "    'track_length': 91,\n",
       "    'distance': 19.005091778934002,\n",
       "    'valid_length': 80,\n",
       "    'continuous_valid_length': 61},\n",
       "   '1625': {'type': 'CYCLIST',\n",
       "    'object_id': '1625',\n",
       "    'track_length': 91,\n",
       "    'distance': 2.818502277135849,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 11},\n",
       "   '1629': {'type': 'VEHICLE',\n",
       "    'object_id': '1629',\n",
       "    'track_length': 91,\n",
       "    'distance': 84.20105910301208,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91}},\n",
       "  'number_summary': {'object': 211,\n",
       "   'dynamic_object_states': 8,\n",
       "   'map_features': 358,\n",
       "   'object_types': {'CYCLIST', 'PEDESTRIAN', 'VEHICLE'},\n",
       "   'object_types_counter': {'VEHICLE': 184, 'PEDESTRIAN': 25, 'CYCLIST': 2},\n",
       "   'dynamic_object_states_types': {'LANE_STATE_STOP', 'LANE_STATE_UNKNOWN'},\n",
       "   'dynamic_object_states_counter': {'LANE_STATE_UNKNOWN': 164,\n",
       "    'LANE_STATE_STOP': 564}}},\n",
       " 'sd_training.tfrecord-00000-of-01000_c403d5992cab9e0.pkl': {'coordinate': 'waymo',\n",
       "  'ts': [0.0,\n",
       "   0.10006000101566315,\n",
       "   0.200080007314682,\n",
       "   0.3000899851322174,\n",
       "   0.40011999011039734,\n",
       "   0.5001299977302551,\n",
       "   0.6001700162887573,\n",
       "   0.7002000212669373,\n",
       "   0.8002200126647949,\n",
       "   0.9002000093460083,\n",
       "   1.000190019607544,\n",
       "   1.1001800298690796,\n",
       "   1.2001700401306152,\n",
       "   1.3001500368118286,\n",
       "   1.4001400470733643,\n",
       "   1.5000799894332886,\n",
       "   1.600059986114502,\n",
       "   1.7000099420547485,\n",
       "   1.7999600172042847,\n",
       "   1.899899959564209,\n",
       "   1.9998500347137451,\n",
       "   2.0998001098632812,\n",
       "   2.1997900009155273,\n",
       "   2.2997701168060303,\n",
       "   2.399790048599243,\n",
       "   2.499809980392456,\n",
       "   2.599829912185669,\n",
       "   2.6998000144958496,\n",
       "   2.7997500896453857,\n",
       "   2.8996999263763428,\n",
       "   2.999660015106201,\n",
       "   3.0996499061584473,\n",
       "   3.19963002204895,\n",
       "   3.2996199131011963,\n",
       "   3.399630069732666,\n",
       "   3.499660015106201,\n",
       "   3.5996899604797363,\n",
       "   3.699709892272949,\n",
       "   3.799730062484741,\n",
       "   3.899790048599243,\n",
       "   3.999809980392456,\n",
       "   4.099800109863281,\n",
       "   4.199820041656494,\n",
       "   4.299829959869385,\n",
       "   4.399849891662598,\n",
       "   4.499859809875488,\n",
       "   4.599890232086182,\n",
       "   4.699860095977783,\n",
       "   4.799849987030029,\n",
       "   4.899839878082275,\n",
       "   4.999800205230713,\n",
       "   5.0997700691223145,\n",
       "   5.199749946594238,\n",
       "   5.299729824066162,\n",
       "   5.399680137634277,\n",
       "   5.499670028686523,\n",
       "   5.5996198654174805,\n",
       "   5.6996002197265625,\n",
       "   5.799590110778809,\n",
       "   5.899569988250732,\n",
       "   5.999629974365234,\n",
       "   6.099689960479736,\n",
       "   6.19966983795166,\n",
       "   6.299610137939453,\n",
       "   6.399630069732666,\n",
       "   6.499619960784912,\n",
       "   6.599649906158447,\n",
       "   6.699629783630371,\n",
       "   6.799620151519775,\n",
       "   6.899569988250732,\n",
       "   6.9995198249816895,\n",
       "   7.0995001792907715,\n",
       "   7.1994500160217285,\n",
       "   7.299469947814941,\n",
       "   7.399499893188477,\n",
       "   7.4994797706604,\n",
       "   7.5995001792907715,\n",
       "   7.699490070343018,\n",
       "   7.799520015716553,\n",
       "   7.899529933929443,\n",
       "   7.999509811401367,\n",
       "   8.099539756774902,\n",
       "   8.199540138244629,\n",
       "   8.299590110778809,\n",
       "   8.399649620056152,\n",
       "   8.499710083007812,\n",
       "   8.599769592285156,\n",
       "   8.699749946594238,\n",
       "   8.799739837646484,\n",
       "   8.899720191955566,\n",
       "   8.999710083007812],\n",
       "  'metadrive_processed': False,\n",
       "  'sdc_id': '2598',\n",
       "  'dataset': 'waymo',\n",
       "  'scenario_id': 'c403d5992cab9e0',\n",
       "  'source_file': 'training.tfrecord-00000-of-01000',\n",
       "  'track_length': 91,\n",
       "  'current_time_index': 10,\n",
       "  'sdc_track_index': 137,\n",
       "  'objects_of_interest': [],\n",
       "  'tracks_to_predict': {'1237': {'track_index': 20,\n",
       "    'track_id': '1237',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '1291': {'track_index': 50,\n",
       "    'track_id': '1291',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '1227': {'track_index': 12,\n",
       "    'track_id': '1227',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '1218': {'track_index': 4,\n",
       "    'track_id': '1218',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '1220': {'track_index': 5,\n",
       "    'track_id': '1220',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '1222': {'track_index': 7,\n",
       "    'track_id': '1222',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '1253': {'track_index': 28,\n",
       "    'track_id': '1253',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '1265': {'track_index': 31,\n",
       "    'track_id': '1265',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'}},\n",
       "  'object_summary': {'sdc': {'type': 'VEHICLE',\n",
       "    'object_id': '2598',\n",
       "    'track_length': 91,\n",
       "    'distance': 87.82377874851227,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '2597': {'type': 'CYCLIST',\n",
       "    'object_id': '2597',\n",
       "    'track_length': 91,\n",
       "    'distance': 19.422608241438866,\n",
       "    'valid_length': 39,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1214': {'type': 'VEHICLE',\n",
       "    'object_id': '1214',\n",
       "    'track_length': 91,\n",
       "    'distance': 95.4300137758255,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1215': {'type': 'VEHICLE',\n",
       "    'object_id': '1215',\n",
       "    'track_length': 91,\n",
       "    'distance': 65.02576625347137,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1217': {'type': 'VEHICLE',\n",
       "    'object_id': '1217',\n",
       "    'track_length': 91,\n",
       "    'distance': 86.97829705476761,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1218': {'type': 'VEHICLE',\n",
       "    'object_id': '1218',\n",
       "    'track_length': 91,\n",
       "    'distance': 87.96404638886452,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1220': {'type': 'VEHICLE',\n",
       "    'object_id': '1220',\n",
       "    'track_length': 91,\n",
       "    'distance': 90.80087488889694,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1221': {'type': 'VEHICLE',\n",
       "    'object_id': '1221',\n",
       "    'track_length': 91,\n",
       "    'distance': 84.7097362279892,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1222': {'type': 'VEHICLE',\n",
       "    'object_id': '1222',\n",
       "    'track_length': 91,\n",
       "    'distance': 105.28678387403488,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1223': {'type': 'VEHICLE',\n",
       "    'object_id': '1223',\n",
       "    'track_length': 91,\n",
       "    'distance': 85.33175677061081,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1224': {'type': 'VEHICLE',\n",
       "    'object_id': '1224',\n",
       "    'track_length': 91,\n",
       "    'distance': 94.17920249700546,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1225': {'type': 'VEHICLE',\n",
       "    'object_id': '1225',\n",
       "    'track_length': 91,\n",
       "    'distance': 100.79324805736542,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1226': {'type': 'VEHICLE',\n",
       "    'object_id': '1226',\n",
       "    'track_length': 91,\n",
       "    'distance': 63.79297003149986,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1227': {'type': 'VEHICLE',\n",
       "    'object_id': '1227',\n",
       "    'track_length': 91,\n",
       "    'distance': 72.77636754512787,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1228': {'type': 'VEHICLE',\n",
       "    'object_id': '1228',\n",
       "    'track_length': 91,\n",
       "    'distance': 39.030971348285675,\n",
       "    'valid_length': 34,\n",
       "    'continuous_valid_length': 28},\n",
       "   '1229': {'type': 'VEHICLE',\n",
       "    'object_id': '1229',\n",
       "    'track_length': 91,\n",
       "    'distance': 21.115224450826645,\n",
       "    'valid_length': 52,\n",
       "    'continuous_valid_length': 49},\n",
       "   '1230': {'type': 'VEHICLE',\n",
       "    'object_id': '1230',\n",
       "    'track_length': 91,\n",
       "    'distance': 104.44723045825958,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1231': {'type': 'VEHICLE',\n",
       "    'object_id': '1231',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 67,\n",
       "    'continuous_valid_length': 51},\n",
       "   '1234': {'type': 'VEHICLE',\n",
       "    'object_id': '1234',\n",
       "    'track_length': 91,\n",
       "    'distance': 14.867855727672577,\n",
       "    'valid_length': 15,\n",
       "    'continuous_valid_length': 15},\n",
       "   '1235': {'type': 'VEHICLE',\n",
       "    'object_id': '1235',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 67,\n",
       "    'continuous_valid_length': 50},\n",
       "   '1236': {'type': 'VEHICLE',\n",
       "    'object_id': '1236',\n",
       "    'track_length': 91,\n",
       "    'distance': 28.499743044376373,\n",
       "    'valid_length': 62,\n",
       "    'continuous_valid_length': 62},\n",
       "   '1237': {'type': 'VEHICLE',\n",
       "    'object_id': '1237',\n",
       "    'track_length': 91,\n",
       "    'distance': 31.441967770457268,\n",
       "    'valid_length': 66,\n",
       "    'continuous_valid_length': 4},\n",
       "   '1241': {'type': 'VEHICLE',\n",
       "    'object_id': '1241',\n",
       "    'track_length': 91,\n",
       "    'distance': 29.400549337267876,\n",
       "    'valid_length': 62,\n",
       "    'continuous_valid_length': 62},\n",
       "   '1242': {'type': 'VEHICLE',\n",
       "    'object_id': '1242',\n",
       "    'track_length': 91,\n",
       "    'distance': 5.463862497359514,\n",
       "    'valid_length': 63,\n",
       "    'continuous_valid_length': 63},\n",
       "   '1243': {'type': 'VEHICLE',\n",
       "    'object_id': '1243',\n",
       "    'track_length': 91,\n",
       "    'distance': 91.42621803283691,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1247': {'type': 'VEHICLE',\n",
       "    'object_id': '1247',\n",
       "    'track_length': 91,\n",
       "    'distance': 50.66574926674366,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1248': {'type': 'VEHICLE',\n",
       "    'object_id': '1248',\n",
       "    'track_length': 91,\n",
       "    'distance': 72.40280821919441,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1250': {'type': 'VEHICLE',\n",
       "    'object_id': '1250',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 6,\n",
       "    'continuous_valid_length': 6},\n",
       "   '1252': {'type': 'VEHICLE',\n",
       "    'object_id': '1252',\n",
       "    'track_length': 91,\n",
       "    'distance': 16.54107877612114,\n",
       "    'valid_length': 65,\n",
       "    'continuous_valid_length': 10},\n",
       "   '1253': {'type': 'VEHICLE',\n",
       "    'object_id': '1253',\n",
       "    'track_length': 91,\n",
       "    'distance': 48.091065883636475,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1260': {'type': 'VEHICLE',\n",
       "    'object_id': '1260',\n",
       "    'track_length': 91,\n",
       "    'distance': 53.428133964538574,\n",
       "    'valid_length': 31,\n",
       "    'continuous_valid_length': 31},\n",
       "   '1263': {'type': 'VEHICLE',\n",
       "    'object_id': '1263',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 59,\n",
       "    'continuous_valid_length': 9},\n",
       "   '1265': {'type': 'VEHICLE',\n",
       "    'object_id': '1265',\n",
       "    'track_length': 91,\n",
       "    'distance': 100.11267822980881,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1268': {'type': 'VEHICLE',\n",
       "    'object_id': '1268',\n",
       "    'track_length': 91,\n",
       "    'distance': 41.54348695278168,\n",
       "    'valid_length': 22,\n",
       "    'continuous_valid_length': 22},\n",
       "   '1269': {'type': 'VEHICLE',\n",
       "    'object_id': '1269',\n",
       "    'track_length': 91,\n",
       "    'distance': 76.1319785118103,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1270': {'type': 'VEHICLE',\n",
       "    'object_id': '1270',\n",
       "    'track_length': 91,\n",
       "    'distance': 52.40373682975769,\n",
       "    'valid_length': 27,\n",
       "    'continuous_valid_length': 27},\n",
       "   '1271': {'type': 'VEHICLE',\n",
       "    'object_id': '1271',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 59,\n",
       "    'continuous_valid_length': 3},\n",
       "   '1273': {'type': 'VEHICLE',\n",
       "    'object_id': '1273',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.7583104372024536,\n",
       "    'valid_length': 2,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1275': {'type': 'VEHICLE',\n",
       "    'object_id': '1275',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 35,\n",
       "    'continuous_valid_length': 33},\n",
       "   '1276': {'type': 'VEHICLE',\n",
       "    'object_id': '1276',\n",
       "    'track_length': 91,\n",
       "    'distance': 71.0501058101654,\n",
       "    'valid_length': 36,\n",
       "    'continuous_valid_length': 12},\n",
       "   '1277': {'type': 'VEHICLE',\n",
       "    'object_id': '1277',\n",
       "    'track_length': 91,\n",
       "    'distance': 57.17885971069336,\n",
       "    'valid_length': 30,\n",
       "    'continuous_valid_length': 30},\n",
       "   '1278': {'type': 'VEHICLE',\n",
       "    'object_id': '1278',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 71,\n",
       "    'continuous_valid_length': 3},\n",
       "   '1279': {'type': 'VEHICLE',\n",
       "    'object_id': '1279',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 23,\n",
       "    'continuous_valid_length': 23},\n",
       "   '1282': {'type': 'VEHICLE',\n",
       "    'object_id': '1282',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 49,\n",
       "    'continuous_valid_length': 2},\n",
       "   '1283': {'type': 'VEHICLE',\n",
       "    'object_id': '1283',\n",
       "    'track_length': 91,\n",
       "    'distance': 6.380410931073129,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1285': {'type': 'VEHICLE',\n",
       "    'object_id': '1285',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 64,\n",
       "    'continuous_valid_length': 13},\n",
       "   '1286': {'type': 'VEHICLE',\n",
       "    'object_id': '1286',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 14,\n",
       "    'continuous_valid_length': 4},\n",
       "   '1287': {'type': 'VEHICLE',\n",
       "    'object_id': '1287',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 45,\n",
       "    'continuous_valid_length': 7},\n",
       "   '1288': {'type': 'VEHICLE',\n",
       "    'object_id': '1288',\n",
       "    'track_length': 91,\n",
       "    'distance': 73.76324367523193,\n",
       "    'valid_length': 40,\n",
       "    'continuous_valid_length': 40},\n",
       "   '1289': {'type': 'VEHICLE',\n",
       "    'object_id': '1289',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 65,\n",
       "    'continuous_valid_length': 65},\n",
       "   '1290': {'type': 'VEHICLE',\n",
       "    'object_id': '1290',\n",
       "    'track_length': 91,\n",
       "    'distance': 95.91793358325958,\n",
       "    'valid_length': 87,\n",
       "    'continuous_valid_length': 3},\n",
       "   '1291': {'type': 'VEHICLE',\n",
       "    'object_id': '1291',\n",
       "    'track_length': 91,\n",
       "    'distance': 36.57883393764496,\n",
       "    'valid_length': 68,\n",
       "    'continuous_valid_length': 3},\n",
       "   '1292': {'type': 'VEHICLE',\n",
       "    'object_id': '1292',\n",
       "    'track_length': 91,\n",
       "    'distance': 78.53501605987549,\n",
       "    'valid_length': 42,\n",
       "    'continuous_valid_length': 42},\n",
       "   '1293': {'type': 'VEHICLE',\n",
       "    'object_id': '1293',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 64,\n",
       "    'continuous_valid_length': 18},\n",
       "   '1294': {'type': 'VEHICLE',\n",
       "    'object_id': '1294',\n",
       "    'track_length': 91,\n",
       "    'distance': 32.968475200235844,\n",
       "    'valid_length': 50,\n",
       "    'continuous_valid_length': 24},\n",
       "   '1296': {'type': 'VEHICLE',\n",
       "    'object_id': '1296',\n",
       "    'track_length': 91,\n",
       "    'distance': 79.13819074630737,\n",
       "    'valid_length': 48,\n",
       "    'continuous_valid_length': 48},\n",
       "   '1297': {'type': 'VEHICLE',\n",
       "    'object_id': '1297',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 35,\n",
       "    'continuous_valid_length': 2},\n",
       "   '1298': {'type': 'VEHICLE',\n",
       "    'object_id': '1298',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 82,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1301': {'type': 'VEHICLE',\n",
       "    'object_id': '1301',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 20,\n",
       "    'continuous_valid_length': 8},\n",
       "   '1302': {'type': 'VEHICLE',\n",
       "    'object_id': '1302',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 31,\n",
       "    'continuous_valid_length': 6},\n",
       "   '1303': {'type': 'VEHICLE',\n",
       "    'object_id': '1303',\n",
       "    'track_length': 91,\n",
       "    'distance': 96.30204486846924,\n",
       "    'valid_length': 59,\n",
       "    'continuous_valid_length': 59},\n",
       "   '1304': {'type': 'VEHICLE',\n",
       "    'object_id': '1304',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 26,\n",
       "    'continuous_valid_length': 25},\n",
       "   '1305': {'type': 'VEHICLE',\n",
       "    'object_id': '1305',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 32,\n",
       "    'continuous_valid_length': 2},\n",
       "   '1307': {'type': 'VEHICLE',\n",
       "    'object_id': '1307',\n",
       "    'track_length': 91,\n",
       "    'distance': 95.65283453464508,\n",
       "    'valid_length': 57,\n",
       "    'continuous_valid_length': 57},\n",
       "   '1308': {'type': 'VEHICLE',\n",
       "    'object_id': '1308',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 14,\n",
       "    'continuous_valid_length': 13},\n",
       "   '1309': {'type': 'VEHICLE',\n",
       "    'object_id': '1309',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 38,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1313': {'type': 'VEHICLE',\n",
       "    'object_id': '1313',\n",
       "    'track_length': 91,\n",
       "    'distance': 52.15755379199982,\n",
       "    'valid_length': 32,\n",
       "    'continuous_valid_length': 32},\n",
       "   '1314': {'type': 'VEHICLE',\n",
       "    'object_id': '1314',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 14,\n",
       "    'continuous_valid_length': 14},\n",
       "   '1316': {'type': 'VEHICLE',\n",
       "    'object_id': '1316',\n",
       "    'track_length': 91,\n",
       "    'distance': 31.985167384147644,\n",
       "    'valid_length': 20,\n",
       "    'continuous_valid_length': 20},\n",
       "   '1317': {'type': 'VEHICLE',\n",
       "    'object_id': '1317',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 59,\n",
       "    'continuous_valid_length': 2},\n",
       "   '1318': {'type': 'VEHICLE',\n",
       "    'object_id': '1318',\n",
       "    'track_length': 91,\n",
       "    'distance': 83.12868297100067,\n",
       "    'valid_length': 57,\n",
       "    'continuous_valid_length': 57},\n",
       "   '1319': {'type': 'VEHICLE',\n",
       "    'object_id': '1319',\n",
       "    'track_length': 91,\n",
       "    'distance': 54.420005321502686,\n",
       "    'valid_length': 30,\n",
       "    'continuous_valid_length': 30},\n",
       "   '1320': {'type': 'VEHICLE',\n",
       "    'object_id': '1320',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 15,\n",
       "    'continuous_valid_length': 13},\n",
       "   '1321': {'type': 'VEHICLE',\n",
       "    'object_id': '1321',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 33,\n",
       "    'continuous_valid_length': 5},\n",
       "   '1322': {'type': 'VEHICLE',\n",
       "    'object_id': '1322',\n",
       "    'track_length': 91,\n",
       "    'distance': 46.28187148272991,\n",
       "    'valid_length': 26,\n",
       "    'continuous_valid_length': 26},\n",
       "   '1323': {'type': 'VEHICLE',\n",
       "    'object_id': '1323',\n",
       "    'track_length': 91,\n",
       "    'distance': 86.94498825073242,\n",
       "    'valid_length': 54,\n",
       "    'continuous_valid_length': 53},\n",
       "   '1324': {'type': 'VEHICLE',\n",
       "    'object_id': '1324',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 48,\n",
       "    'continuous_valid_length': 19},\n",
       "   '1328': {'type': 'VEHICLE',\n",
       "    'object_id': '1328',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 58,\n",
       "    'continuous_valid_length': 50},\n",
       "   '1329': {'type': 'VEHICLE',\n",
       "    'object_id': '1329',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.33421724662184715,\n",
       "    'valid_length': 6,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1330': {'type': 'VEHICLE',\n",
       "    'object_id': '1330',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 50,\n",
       "    'continuous_valid_length': 34},\n",
       "   '1333': {'type': 'VEHICLE',\n",
       "    'object_id': '1333',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 4},\n",
       "   '1334': {'type': 'VEHICLE',\n",
       "    'object_id': '1334',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 49,\n",
       "    'continuous_valid_length': 49},\n",
       "   '1336': {'type': 'VEHICLE',\n",
       "    'object_id': '1336',\n",
       "    'track_length': 91,\n",
       "    'distance': 43.218641459941864,\n",
       "    'valid_length': 44,\n",
       "    'continuous_valid_length': 17},\n",
       "   '1340': {'type': 'VEHICLE',\n",
       "    'object_id': '1340',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 47,\n",
       "    'continuous_valid_length': 31},\n",
       "   '1341': {'type': 'VEHICLE',\n",
       "    'object_id': '1341',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 26,\n",
       "    'continuous_valid_length': 17},\n",
       "   '1342': {'type': 'VEHICLE',\n",
       "    'object_id': '1342',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 39,\n",
       "    'continuous_valid_length': 6},\n",
       "   '1343': {'type': 'VEHICLE',\n",
       "    'object_id': '1343',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 46,\n",
       "    'continuous_valid_length': 46},\n",
       "   '1344': {'type': 'VEHICLE',\n",
       "    'object_id': '1344',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 25,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1345': {'type': 'VEHICLE',\n",
       "    'object_id': '1345',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 23,\n",
       "    'continuous_valid_length': 16},\n",
       "   '1347': {'type': 'VEHICLE',\n",
       "    'object_id': '1347',\n",
       "    'track_length': 91,\n",
       "    'distance': 62.98618245124817,\n",
       "    'valid_length': 44,\n",
       "    'continuous_valid_length': 44},\n",
       "   '1348': {'type': 'VEHICLE',\n",
       "    'object_id': '1348',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 43,\n",
       "    'continuous_valid_length': 43},\n",
       "   '1349': {'type': 'VEHICLE',\n",
       "    'object_id': '1349',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 14,\n",
       "    'continuous_valid_length': 12},\n",
       "   '1350': {'type': 'VEHICLE',\n",
       "    'object_id': '1350',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 31,\n",
       "    'continuous_valid_length': 5},\n",
       "   '1351': {'type': 'VEHICLE',\n",
       "    'object_id': '1351',\n",
       "    'track_length': 91,\n",
       "    'distance': 9.257302701473236,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 10},\n",
       "   '1352': {'type': 'VEHICLE',\n",
       "    'object_id': '1352',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 12,\n",
       "    'continuous_valid_length': 12},\n",
       "   '1353': {'type': 'VEHICLE',\n",
       "    'object_id': '1353',\n",
       "    'track_length': 91,\n",
       "    'distance': 14.692552208900452,\n",
       "    'valid_length': 9,\n",
       "    'continuous_valid_length': 9},\n",
       "   '1355': {'type': 'VEHICLE',\n",
       "    'object_id': '1355',\n",
       "    'track_length': 91,\n",
       "    'distance': 2.251300647854805,\n",
       "    'valid_length': 8,\n",
       "    'continuous_valid_length': 8},\n",
       "   '1356': {'type': 'VEHICLE',\n",
       "    'object_id': '1356',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 24,\n",
       "    'continuous_valid_length': 2},\n",
       "   '1357': {'type': 'VEHICLE',\n",
       "    'object_id': '1357',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 16,\n",
       "    'continuous_valid_length': 7},\n",
       "   '1358': {'type': 'VEHICLE',\n",
       "    'object_id': '1358',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 15,\n",
       "    'continuous_valid_length': 15},\n",
       "   '1359': {'type': 'VEHICLE',\n",
       "    'object_id': '1359',\n",
       "    'track_length': 91,\n",
       "    'distance': 56.70941114425659,\n",
       "    'valid_length': 36,\n",
       "    'continuous_valid_length': 36},\n",
       "   '1362': {'type': 'VEHICLE',\n",
       "    'object_id': '1362',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 19,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1363': {'type': 'VEHICLE',\n",
       "    'object_id': '1363',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 31,\n",
       "    'continuous_valid_length': 2},\n",
       "   '1364': {'type': 'VEHICLE',\n",
       "    'object_id': '1364',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 12,\n",
       "    'continuous_valid_length': 12},\n",
       "   '1365': {'type': 'VEHICLE',\n",
       "    'object_id': '1365',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 23,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1366': {'type': 'VEHICLE',\n",
       "    'object_id': '1366',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 36,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1369': {'type': 'VEHICLE',\n",
       "    'object_id': '1369',\n",
       "    'track_length': 91,\n",
       "    'distance': 3.708642393350601,\n",
       "    'valid_length': 9,\n",
       "    'continuous_valid_length': 9},\n",
       "   '1371': {'type': 'VEHICLE',\n",
       "    'object_id': '1371',\n",
       "    'track_length': 91,\n",
       "    'distance': 26.28937864303589,\n",
       "    'valid_length': 29,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1373': {'type': 'VEHICLE',\n",
       "    'object_id': '1373',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 31,\n",
       "    'continuous_valid_length': 31},\n",
       "   '1374': {'type': 'VEHICLE',\n",
       "    'object_id': '1374',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 25,\n",
       "    'continuous_valid_length': 11},\n",
       "   '1375': {'type': 'VEHICLE',\n",
       "    'object_id': '1375',\n",
       "    'track_length': 91,\n",
       "    'distance': 17.731433033943176,\n",
       "    'valid_length': 16,\n",
       "    'continuous_valid_length': 7},\n",
       "   '1376': {'type': 'VEHICLE',\n",
       "    'object_id': '1376',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 23,\n",
       "    'continuous_valid_length': 8},\n",
       "   '1377': {'type': 'VEHICLE',\n",
       "    'object_id': '1377',\n",
       "    'track_length': 91,\n",
       "    'distance': 15.446531981229782,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 11},\n",
       "   '1378': {'type': 'VEHICLE',\n",
       "    'object_id': '1378',\n",
       "    'track_length': 91,\n",
       "    'distance': 29.286632299423218,\n",
       "    'valid_length': 27,\n",
       "    'continuous_valid_length': 27},\n",
       "   '1380': {'type': 'VEHICLE',\n",
       "    'object_id': '1380',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 8},\n",
       "   '1381': {'type': 'VEHICLE',\n",
       "    'object_id': '1381',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 9,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1383': {'type': 'VEHICLE',\n",
       "    'object_id': '1383',\n",
       "    'track_length': 91,\n",
       "    'distance': 4.2747403010725975,\n",
       "    'valid_length': 20,\n",
       "    'continuous_valid_length': 4},\n",
       "   '1384': {'type': 'VEHICLE',\n",
       "    'object_id': '1384',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 24,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1385': {'type': 'VEHICLE',\n",
       "    'object_id': '1385',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.6140819936990738,\n",
       "    'valid_length': 6,\n",
       "    'continuous_valid_length': 6},\n",
       "   '1387': {'type': 'VEHICLE',\n",
       "    'object_id': '1387',\n",
       "    'track_length': 91,\n",
       "    'distance': 22.68112200498581,\n",
       "    'valid_length': 19,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1390': {'type': 'VEHICLE',\n",
       "    'object_id': '1390',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 17,\n",
       "    'continuous_valid_length': 17},\n",
       "   '1392': {'type': 'VEHICLE',\n",
       "    'object_id': '1392',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 17,\n",
       "    'continuous_valid_length': 3},\n",
       "   '1393': {'type': 'VEHICLE',\n",
       "    'object_id': '1393',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 18,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1394': {'type': 'VEHICLE',\n",
       "    'object_id': '1394',\n",
       "    'track_length': 91,\n",
       "    'distance': 3.2920728027820587,\n",
       "    'valid_length': 15,\n",
       "    'continuous_valid_length': 15},\n",
       "   '1395': {'type': 'VEHICLE',\n",
       "    'object_id': '1395',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 16,\n",
       "    'continuous_valid_length': 16},\n",
       "   '1396': {'type': 'VEHICLE',\n",
       "    'object_id': '1396',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 10},\n",
       "   '1398': {'type': 'VEHICLE',\n",
       "    'object_id': '1398',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 15,\n",
       "    'continuous_valid_length': 15},\n",
       "   '1399': {'type': 'VEHICLE',\n",
       "    'object_id': '1399',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 14,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1400': {'type': 'VEHICLE',\n",
       "    'object_id': '1400',\n",
       "    'track_length': 91,\n",
       "    'distance': 9.308314561843872,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 11},\n",
       "   '1401': {'type': 'VEHICLE',\n",
       "    'object_id': '1401',\n",
       "    'track_length': 91,\n",
       "    'distance': 11.692797064781189,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 10},\n",
       "   '1402': {'type': 'VEHICLE',\n",
       "    'object_id': '1402',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 10},\n",
       "   '1403': {'type': 'VEHICLE',\n",
       "    'object_id': '1403',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 12,\n",
       "    'continuous_valid_length': 2},\n",
       "   '1405': {'type': 'VEHICLE',\n",
       "    'object_id': '1405',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 10},\n",
       "   '1406': {'type': 'VEHICLE',\n",
       "    'object_id': '1406',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 8,\n",
       "    'continuous_valid_length': 8},\n",
       "   '1408': {'type': 'VEHICLE',\n",
       "    'object_id': '1408',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.416461169719696,\n",
       "    'valid_length': 4,\n",
       "    'continuous_valid_length': 4},\n",
       "   '1500': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '1500',\n",
       "    'track_length': 91,\n",
       "    'distance': 4.96656234562397,\n",
       "    'valid_length': 30,\n",
       "    'continuous_valid_length': 11},\n",
       "   '1501': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '1501',\n",
       "    'track_length': 91,\n",
       "    'distance': 6.989344105124474,\n",
       "    'valid_length': 16,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1504': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '1504',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.29410819709301,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 10},\n",
       "   '2598': {'type': 'VEHICLE',\n",
       "    'object_id': '2598',\n",
       "    'track_length': 91,\n",
       "    'distance': 87.82377874851227,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91}},\n",
       "  'number_summary': {'object': 138,\n",
       "   'dynamic_object_states': 8,\n",
       "   'map_features': 378,\n",
       "   'object_types': {'CYCLIST', 'PEDESTRIAN', 'VEHICLE'},\n",
       "   'object_types_counter': {'CYCLIST': 1, 'VEHICLE': 134, 'PEDESTRIAN': 3},\n",
       "   'dynamic_object_states_types': {'LANE_STATE_GO'},\n",
       "   'dynamic_object_states_counter': {'LANE_STATE_GO': 728}}},\n",
       " 'sd_training.tfrecord-00000-of-01000_8a346109094cd5aa.pkl': {'coordinate': 'waymo',\n",
       "  'ts': [0.0,\n",
       "   0.10002999752759933,\n",
       "   0.2000100016593933,\n",
       "   0.300029993057251,\n",
       "   0.40005001425743103,\n",
       "   0.5000699758529663,\n",
       "   0.6000699996948242,\n",
       "   0.7000600099563599,\n",
       "   0.8000900149345398,\n",
       "   0.9001399874687195,\n",
       "   1.0001599788665771,\n",
       "   1.1001800298690796,\n",
       "   1.2001700401306152,\n",
       "   1.3001899719238281,\n",
       "   1.4002100229263306,\n",
       "   1.5002299547195435,\n",
       "   1.6002899408340454,\n",
       "   1.700279951095581,\n",
       "   1.8003100156784058,\n",
       "   1.9003000259399414,\n",
       "   2.000309944152832,\n",
       "   2.1003000736236572,\n",
       "   2.200239896774292,\n",
       "   2.300220012664795,\n",
       "   2.400209903717041,\n",
       "   2.500200033187866,\n",
       "   2.6001501083374023,\n",
       "   2.7001099586486816,\n",
       "   2.8000500202178955,\n",
       "   2.9000298976898193,\n",
       "   3.0000100135803223,\n",
       "   3.0999999046325684,\n",
       "   3.200000047683716,\n",
       "   3.3000199794769287,\n",
       "   3.400010108947754,\n",
       "   3.5000600814819336,\n",
       "   3.6000800132751465,\n",
       "   3.7000999450683594,\n",
       "   3.8001201152801514,\n",
       "   3.9001100063323975,\n",
       "   4.000100135803223,\n",
       "   4.1001200675964355,\n",
       "   4.200109958648682,\n",
       "   4.3000898361206055,\n",
       "   4.400109767913818,\n",
       "   4.5001301765441895,\n",
       "   4.6001200675964355,\n",
       "   4.700109958648682,\n",
       "   4.8000898361206055,\n",
       "   4.9000701904296875,\n",
       "   5.000050067901611,\n",
       "   5.100039958953857,\n",
       "   5.1999897956848145,\n",
       "   5.2999701499938965,\n",
       "   5.3999199867248535,\n",
       "   5.4999098777771,\n",
       "   5.599860191345215,\n",
       "   5.69980001449585,\n",
       "   5.799789905548096,\n",
       "   5.8997697830200195,\n",
       "   5.999760150909424,\n",
       "   6.09975004196167,\n",
       "   6.199739933013916,\n",
       "   6.29971981048584,\n",
       "   6.399740219116211,\n",
       "   6.499730110168457,\n",
       "   6.599709987640381,\n",
       "   6.699689865112305,\n",
       "   6.799680233001709,\n",
       "   6.899660110473633,\n",
       "   6.999639987945557,\n",
       "   7.099589824676514,\n",
       "   7.199580192565918,\n",
       "   7.299560070037842,\n",
       "   7.399549961090088,\n",
       "   7.499529838562012,\n",
       "   7.599520206451416,\n",
       "   7.699540138244629,\n",
       "   7.799560070037842,\n",
       "   7.899580001831055,\n",
       "   7.99960994720459,\n",
       "   8.099630355834961,\n",
       "   8.199609756469727,\n",
       "   8.299630165100098,\n",
       "   8.399660110473633,\n",
       "   8.499640464782715,\n",
       "   8.599630355834961,\n",
       "   8.699649810791016,\n",
       "   8.799670219421387,\n",
       "   8.899720191955566,\n",
       "   8.999739646911621],\n",
       "  'metadrive_processed': False,\n",
       "  'sdc_id': '1101',\n",
       "  'dataset': 'waymo',\n",
       "  'scenario_id': '8a346109094cd5aa',\n",
       "  'source_file': 'training.tfrecord-00000-of-01000',\n",
       "  'track_length': 91,\n",
       "  'current_time_index': 10,\n",
       "  'sdc_track_index': 114,\n",
       "  'objects_of_interest': ['741', '745'],\n",
       "  'tracks_to_predict': {'741': {'track_index': 9,\n",
       "    'track_id': '741',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '745': {'track_index': 12,\n",
       "    'track_id': '745',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '1050': {'track_index': 0,\n",
       "    'track_id': '1050',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'PEDESTRIAN'},\n",
       "   '750': {'track_index': 14,\n",
       "    'track_id': '750',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '842': {'track_index': 54,\n",
       "    'track_id': '842',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '831': {'track_index': 46,\n",
       "    'track_id': '831',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '738': {'track_index': 6,\n",
       "    'track_id': '738',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'},\n",
       "   '746': {'track_index': 13,\n",
       "    'track_id': '746',\n",
       "    'difficulty': 0,\n",
       "    'object_type': 'VEHICLE'}},\n",
       "  'object_summary': {'sdc': {'type': 'VEHICLE',\n",
       "    'object_id': '1101',\n",
       "    'track_length': 91,\n",
       "    'distance': 122.12530386447906,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '1050': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '1050',\n",
       "    'track_length': 91,\n",
       "    'distance': 9.790450505912304,\n",
       "    'valid_length': 71,\n",
       "    'continuous_valid_length': 71},\n",
       "   '1081': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '1081',\n",
       "    'track_length': 91,\n",
       "    'distance': 1.2733226278796792,\n",
       "    'valid_length': 29,\n",
       "    'continuous_valid_length': 1},\n",
       "   '1083': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '1083',\n",
       "    'track_length': 91,\n",
       "    'distance': 4.794791121967137,\n",
       "    'valid_length': 41,\n",
       "    'continuous_valid_length': 31},\n",
       "   '1089': {'type': 'PEDESTRIAN',\n",
       "    'object_id': '1089',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.7878000712953508,\n",
       "    'valid_length': 34,\n",
       "    'continuous_valid_length': 3},\n",
       "   '1100': {'type': 'CYCLIST',\n",
       "    'object_id': '1100',\n",
       "    'track_length': 91,\n",
       "    'distance': 26.46271361783147,\n",
       "    'valid_length': 38,\n",
       "    'continuous_valid_length': 26},\n",
       "   '737': {'type': 'VEHICLE',\n",
       "    'object_id': '737',\n",
       "    'track_length': 91,\n",
       "    'distance': 122.45794355869293,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '738': {'type': 'VEHICLE',\n",
       "    'object_id': '738',\n",
       "    'track_length': 91,\n",
       "    'distance': 134.9375034570694,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '739': {'type': 'VEHICLE',\n",
       "    'object_id': '739',\n",
       "    'track_length': 91,\n",
       "    'distance': 112.44656717777252,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '740': {'type': 'VEHICLE',\n",
       "    'object_id': '740',\n",
       "    'track_length': 91,\n",
       "    'distance': 150.05923771858215,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '741': {'type': 'VEHICLE',\n",
       "    'object_id': '741',\n",
       "    'track_length': 91,\n",
       "    'distance': 128.73374009132385,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '742': {'type': 'VEHICLE',\n",
       "    'object_id': '742',\n",
       "    'track_length': 91,\n",
       "    'distance': 124.16180717945099,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '743': {'type': 'VEHICLE',\n",
       "    'object_id': '743',\n",
       "    'track_length': 91,\n",
       "    'distance': 47.489983677864075,\n",
       "    'valid_length': 33,\n",
       "    'continuous_valid_length': 33},\n",
       "   '745': {'type': 'VEHICLE',\n",
       "    'object_id': '745',\n",
       "    'track_length': 91,\n",
       "    'distance': 126.6462013721466,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '746': {'type': 'VEHICLE',\n",
       "    'object_id': '746',\n",
       "    'track_length': 91,\n",
       "    'distance': 127.79229056835175,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '750': {'type': 'VEHICLE',\n",
       "    'object_id': '750',\n",
       "    'track_length': 91,\n",
       "    'distance': 112.30372673273087,\n",
       "    'valid_length': 79,\n",
       "    'continuous_valid_length': 43},\n",
       "   '751': {'type': 'VEHICLE',\n",
       "    'object_id': '751',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 7,\n",
       "    'continuous_valid_length': 7},\n",
       "   '754': {'type': 'VEHICLE',\n",
       "    'object_id': '754',\n",
       "    'track_length': 91,\n",
       "    'distance': 117.75635361671448,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '756': {'type': 'VEHICLE',\n",
       "    'object_id': '756',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 17,\n",
       "    'continuous_valid_length': 16},\n",
       "   '757': {'type': 'VEHICLE',\n",
       "    'object_id': '757',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 23,\n",
       "    'continuous_valid_length': 23},\n",
       "   '758': {'type': 'VEHICLE',\n",
       "    'object_id': '758',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 2,\n",
       "    'continuous_valid_length': 1},\n",
       "   '759': {'type': 'VEHICLE',\n",
       "    'object_id': '759',\n",
       "    'track_length': 91,\n",
       "    'distance': 6.071752667427063,\n",
       "    'valid_length': 5,\n",
       "    'continuous_valid_length': 5},\n",
       "   '760': {'type': 'VEHICLE',\n",
       "    'object_id': '760',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 55,\n",
       "    'continuous_valid_length': 54},\n",
       "   '761': {'type': 'VEHICLE',\n",
       "    'object_id': '761',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 14,\n",
       "    'continuous_valid_length': 14},\n",
       "   '763': {'type': 'VEHICLE',\n",
       "    'object_id': '763',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 14,\n",
       "    'continuous_valid_length': 9},\n",
       "   '765': {'type': 'VEHICLE',\n",
       "    'object_id': '765',\n",
       "    'track_length': 91,\n",
       "    'distance': 117.67978709936142,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '766': {'type': 'VEHICLE',\n",
       "    'object_id': '766',\n",
       "    'track_length': 91,\n",
       "    'distance': 9.094105064868927,\n",
       "    'valid_length': 6,\n",
       "    'continuous_valid_length': 1},\n",
       "   '767': {'type': 'VEHICLE',\n",
       "    'object_id': '767',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 17,\n",
       "    'continuous_valid_length': 17},\n",
       "   '781': {'type': 'VEHICLE',\n",
       "    'object_id': '781',\n",
       "    'track_length': 91,\n",
       "    'distance': 121.01804101467133,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '792': {'type': 'VEHICLE',\n",
       "    'object_id': '792',\n",
       "    'track_length': 91,\n",
       "    'distance': 46.89462369680405,\n",
       "    'valid_length': 41,\n",
       "    'continuous_valid_length': 41},\n",
       "   '794': {'type': 'VEHICLE',\n",
       "    'object_id': '794',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 84,\n",
       "    'continuous_valid_length': 84},\n",
       "   '795': {'type': 'VEHICLE',\n",
       "    'object_id': '795',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 67,\n",
       "    'continuous_valid_length': 42},\n",
       "   '796': {'type': 'VEHICLE',\n",
       "    'object_id': '796',\n",
       "    'track_length': 91,\n",
       "    'distance': 43.73955598473549,\n",
       "    'valid_length': 48,\n",
       "    'continuous_valid_length': 36},\n",
       "   '797': {'type': 'VEHICLE',\n",
       "    'object_id': '797',\n",
       "    'track_length': 91,\n",
       "    'distance': 19.307358741760254,\n",
       "    'valid_length': 16,\n",
       "    'continuous_valid_length': 16},\n",
       "   '805': {'type': 'VEHICLE',\n",
       "    'object_id': '805',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 79,\n",
       "    'continuous_valid_length': 78},\n",
       "   '806': {'type': 'VEHICLE',\n",
       "    'object_id': '806',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 90,\n",
       "    'continuous_valid_length': 90},\n",
       "   '808': {'type': 'VEHICLE',\n",
       "    'object_id': '808',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 13},\n",
       "   '809': {'type': 'VEHICLE',\n",
       "    'object_id': '809',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 13},\n",
       "   '812': {'type': 'VEHICLE',\n",
       "    'object_id': '812',\n",
       "    'track_length': 91,\n",
       "    'distance': 52.61800414323807,\n",
       "    'valid_length': 49,\n",
       "    'continuous_valid_length': 49},\n",
       "   '814': {'type': 'VEHICLE',\n",
       "    'object_id': '814',\n",
       "    'track_length': 91,\n",
       "    'distance': 10.006099774269387,\n",
       "    'valid_length': 74,\n",
       "    'continuous_valid_length': 74},\n",
       "   '816': {'type': 'VEHICLE',\n",
       "    'object_id': '816',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 81,\n",
       "    'continuous_valid_length': 80},\n",
       "   '818': {'type': 'VEHICLE',\n",
       "    'object_id': '818',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 5,\n",
       "    'continuous_valid_length': 5},\n",
       "   '823': {'type': 'VEHICLE',\n",
       "    'object_id': '823',\n",
       "    'track_length': 91,\n",
       "    'distance': 54.742457926273346,\n",
       "    'valid_length': 54,\n",
       "    'continuous_valid_length': 54},\n",
       "   '825': {'type': 'VEHICLE',\n",
       "    'object_id': '825',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '826': {'type': 'VEHICLE',\n",
       "    'object_id': '826',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '827': {'type': 'VEHICLE',\n",
       "    'object_id': '827',\n",
       "    'track_length': 91,\n",
       "    'distance': 45.39897038042545,\n",
       "    'valid_length': 64,\n",
       "    'continuous_valid_length': 64},\n",
       "   '828': {'type': 'VEHICLE',\n",
       "    'object_id': '828',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 90,\n",
       "    'continuous_valid_length': 88},\n",
       "   '831': {'type': 'VEHICLE',\n",
       "    'object_id': '831',\n",
       "    'track_length': 91,\n",
       "    'distance': 34.15754503197968,\n",
       "    'valid_length': 67,\n",
       "    'continuous_valid_length': 67},\n",
       "   '832': {'type': 'VEHICLE',\n",
       "    'object_id': '832',\n",
       "    'track_length': 91,\n",
       "    'distance': 49.80105346441269,\n",
       "    'valid_length': 52,\n",
       "    'continuous_valid_length': 52},\n",
       "   '833': {'type': 'VEHICLE',\n",
       "    'object_id': '833',\n",
       "    'track_length': 91,\n",
       "    'distance': 5.0127023458480835,\n",
       "    'valid_length': 12,\n",
       "    'continuous_valid_length': 12},\n",
       "   '834': {'type': 'VEHICLE',\n",
       "    'object_id': '834',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '838': {'type': 'VEHICLE',\n",
       "    'object_id': '838',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 1,\n",
       "    'continuous_valid_length': 1},\n",
       "   '839': {'type': 'VEHICLE',\n",
       "    'object_id': '839',\n",
       "    'track_length': 91,\n",
       "    'distance': 38.64023446571082,\n",
       "    'valid_length': 82,\n",
       "    'continuous_valid_length': 82},\n",
       "   '840': {'type': 'VEHICLE',\n",
       "    'object_id': '840',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.043552935123443604,\n",
       "    'valid_length': 2,\n",
       "    'continuous_valid_length': 2},\n",
       "   '841': {'type': 'VEHICLE',\n",
       "    'object_id': '841',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 4,\n",
       "    'continuous_valid_length': 4},\n",
       "   '842': {'type': 'VEHICLE',\n",
       "    'object_id': '842',\n",
       "    'track_length': 91,\n",
       "    'distance': 43.47445898782462,\n",
       "    'valid_length': 79,\n",
       "    'continuous_valid_length': 79},\n",
       "   '843': {'type': 'VEHICLE',\n",
       "    'object_id': '843',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '844': {'type': 'VEHICLE',\n",
       "    'object_id': '844',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91},\n",
       "   '845': {'type': 'VEHICLE',\n",
       "    'object_id': '845',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 15,\n",
       "    'continuous_valid_length': 15},\n",
       "   '847': {'type': 'VEHICLE',\n",
       "    'object_id': '847',\n",
       "    'track_length': 91,\n",
       "    'distance': 24.376048356294632,\n",
       "    'valid_length': 44,\n",
       "    'continuous_valid_length': 10},\n",
       "   '849': {'type': 'VEHICLE',\n",
       "    'object_id': '849',\n",
       "    'track_length': 91,\n",
       "    'distance': 41.39833474159241,\n",
       "    'valid_length': 54,\n",
       "    'continuous_valid_length': 54},\n",
       "   '851': {'type': 'VEHICLE',\n",
       "    'object_id': '851',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 9},\n",
       "   '853': {'type': 'VEHICLE',\n",
       "    'object_id': '853',\n",
       "    'track_length': 91,\n",
       "    'distance': 49.54816070199013,\n",
       "    'valid_length': 54,\n",
       "    'continuous_valid_length': 2},\n",
       "   '854': {'type': 'VEHICLE',\n",
       "    'object_id': '854',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 81,\n",
       "    'continuous_valid_length': 6},\n",
       "   '856': {'type': 'VEHICLE',\n",
       "    'object_id': '856',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 8,\n",
       "    'continuous_valid_length': 8},\n",
       "   '859': {'type': 'VEHICLE',\n",
       "    'object_id': '859',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 77,\n",
       "    'continuous_valid_length': 77},\n",
       "   '860': {'type': 'VEHICLE',\n",
       "    'object_id': '860',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.5522801652550697,\n",
       "    'valid_length': 6,\n",
       "    'continuous_valid_length': 1},\n",
       "   '861': {'type': 'VEHICLE',\n",
       "    'object_id': '861',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 65,\n",
       "    'continuous_valid_length': 1},\n",
       "   '862': {'type': 'VEHICLE',\n",
       "    'object_id': '862',\n",
       "    'track_length': 91,\n",
       "    'distance': 36.15771186351776,\n",
       "    'valid_length': 35,\n",
       "    'continuous_valid_length': 28},\n",
       "   '863': {'type': 'VEHICLE',\n",
       "    'object_id': '863',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.9843477308750153,\n",
       "    'valid_length': 6,\n",
       "    'continuous_valid_length': 6},\n",
       "   '864': {'type': 'VEHICLE',\n",
       "    'object_id': '864',\n",
       "    'track_length': 91,\n",
       "    'distance': 17.221552340779454,\n",
       "    'valid_length': 71,\n",
       "    'continuous_valid_length': 36},\n",
       "   '865': {'type': 'VEHICLE',\n",
       "    'object_id': '865',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 69,\n",
       "    'continuous_valid_length': 6},\n",
       "   '866': {'type': 'VEHICLE',\n",
       "    'object_id': '866',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 82,\n",
       "    'continuous_valid_length': 5},\n",
       "   '867': {'type': 'VEHICLE',\n",
       "    'object_id': '867',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 37,\n",
       "    'continuous_valid_length': 3},\n",
       "   '868': {'type': 'VEHICLE',\n",
       "    'object_id': '868',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 29,\n",
       "    'continuous_valid_length': 2},\n",
       "   '869': {'type': 'VEHICLE',\n",
       "    'object_id': '869',\n",
       "    'track_length': 91,\n",
       "    'distance': 30.463066234253347,\n",
       "    'valid_length': 69,\n",
       "    'continuous_valid_length': 42},\n",
       "   '870': {'type': 'VEHICLE',\n",
       "    'object_id': '870',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 54,\n",
       "    'continuous_valid_length': 5},\n",
       "   '871': {'type': 'VEHICLE',\n",
       "    'object_id': '871',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 18,\n",
       "    'continuous_valid_length': 7},\n",
       "   '872': {'type': 'VEHICLE',\n",
       "    'object_id': '872',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 32,\n",
       "    'continuous_valid_length': 4},\n",
       "   '874': {'type': 'VEHICLE',\n",
       "    'object_id': '874',\n",
       "    'track_length': 91,\n",
       "    'distance': 16.413522362709045,\n",
       "    'valid_length': 10,\n",
       "    'continuous_valid_length': 10},\n",
       "   '877': {'type': 'VEHICLE',\n",
       "    'object_id': '877',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 1},\n",
       "   '878': {'type': 'VEHICLE',\n",
       "    'object_id': '878',\n",
       "    'track_length': 91,\n",
       "    'distance': 10.622371017932892,\n",
       "    'valid_length': 21,\n",
       "    'continuous_valid_length': 5},\n",
       "   '879': {'type': 'VEHICLE',\n",
       "    'object_id': '879',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 13,\n",
       "    'continuous_valid_length': 5},\n",
       "   '880': {'type': 'VEHICLE',\n",
       "    'object_id': '880',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 57,\n",
       "    'continuous_valid_length': 57},\n",
       "   '881': {'type': 'VEHICLE',\n",
       "    'object_id': '881',\n",
       "    'track_length': 91,\n",
       "    'distance': 83.66396069526672,\n",
       "    'valid_length': 59,\n",
       "    'continuous_valid_length': 59},\n",
       "   '882': {'type': 'VEHICLE',\n",
       "    'object_id': '882',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 52,\n",
       "    'continuous_valid_length': 1},\n",
       "   '883': {'type': 'VEHICLE',\n",
       "    'object_id': '883',\n",
       "    'track_length': 91,\n",
       "    'distance': 26.821755178272724,\n",
       "    'valid_length': 56,\n",
       "    'continuous_valid_length': 23},\n",
       "   '884': {'type': 'VEHICLE',\n",
       "    'object_id': '884',\n",
       "    'track_length': 91,\n",
       "    'distance': 35.09420407534344,\n",
       "    'valid_length': 47,\n",
       "    'continuous_valid_length': 7},\n",
       "   '886': {'type': 'VEHICLE',\n",
       "    'object_id': '886',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 59,\n",
       "    'continuous_valid_length': 2},\n",
       "   '887': {'type': 'VEHICLE',\n",
       "    'object_id': '887',\n",
       "    'track_length': 91,\n",
       "    'distance': 11.77469289302826,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 11},\n",
       "   '888': {'type': 'VEHICLE',\n",
       "    'object_id': '888',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 23,\n",
       "    'continuous_valid_length': 1},\n",
       "   '889': {'type': 'VEHICLE',\n",
       "    'object_id': '889',\n",
       "    'track_length': 91,\n",
       "    'distance': 21.950896739959717,\n",
       "    'valid_length': 37,\n",
       "    'continuous_valid_length': 23},\n",
       "   '891': {'type': 'VEHICLE',\n",
       "    'object_id': '891',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 32,\n",
       "    'continuous_valid_length': 1},\n",
       "   '892': {'type': 'VEHICLE',\n",
       "    'object_id': '892',\n",
       "    'track_length': 91,\n",
       "    'distance': 69.73329615592957,\n",
       "    'valid_length': 49,\n",
       "    'continuous_valid_length': 49},\n",
       "   '893': {'type': 'VEHICLE',\n",
       "    'object_id': '893',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 18,\n",
       "    'continuous_valid_length': 17},\n",
       "   '895': {'type': 'VEHICLE',\n",
       "    'object_id': '895',\n",
       "    'track_length': 91,\n",
       "    'distance': 49.012829542160034,\n",
       "    'valid_length': 43,\n",
       "    'continuous_valid_length': 38},\n",
       "   '896': {'type': 'VEHICLE',\n",
       "    'object_id': '896',\n",
       "    'track_length': 91,\n",
       "    'distance': 16.33118897676468,\n",
       "    'valid_length': 42,\n",
       "    'continuous_valid_length': 42},\n",
       "   '897': {'type': 'VEHICLE',\n",
       "    'object_id': '897',\n",
       "    'track_length': 91,\n",
       "    'distance': 2.5570742785930634,\n",
       "    'valid_length': 6,\n",
       "    'continuous_valid_length': 6},\n",
       "   '899': {'type': 'VEHICLE',\n",
       "    'object_id': '899',\n",
       "    'track_length': 91,\n",
       "    'distance': 39.58753824234009,\n",
       "    'valid_length': 34,\n",
       "    'continuous_valid_length': 34},\n",
       "   '900': {'type': 'VEHICLE',\n",
       "    'object_id': '900',\n",
       "    'track_length': 91,\n",
       "    'distance': 36.107217669487,\n",
       "    'valid_length': 34,\n",
       "    'continuous_valid_length': 34},\n",
       "   '902': {'type': 'VEHICLE',\n",
       "    'object_id': '902',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 32,\n",
       "    'continuous_valid_length': 32},\n",
       "   '903': {'type': 'VEHICLE',\n",
       "    'object_id': '903',\n",
       "    'track_length': 91,\n",
       "    'distance': 23.143770575523376,\n",
       "    'valid_length': 30,\n",
       "    'continuous_valid_length': 30},\n",
       "   '904': {'type': 'VEHICLE',\n",
       "    'object_id': '904',\n",
       "    'track_length': 91,\n",
       "    'distance': 31.82175576686859,\n",
       "    'valid_length': 30,\n",
       "    'continuous_valid_length': 30},\n",
       "   '909': {'type': 'VEHICLE',\n",
       "    'object_id': '909',\n",
       "    'track_length': 91,\n",
       "    'distance': 14.256664991378784,\n",
       "    'valid_length': 24,\n",
       "    'continuous_valid_length': 24},\n",
       "   '910': {'type': 'VEHICLE',\n",
       "    'object_id': '910',\n",
       "    'track_length': 91,\n",
       "    'distance': 22.127152025699615,\n",
       "    'valid_length': 22,\n",
       "    'continuous_valid_length': 22},\n",
       "   '911': {'type': 'VEHICLE',\n",
       "    'object_id': '911',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 18,\n",
       "    'continuous_valid_length': 18},\n",
       "   '912': {'type': 'VEHICLE',\n",
       "    'object_id': '912',\n",
       "    'track_length': 91,\n",
       "    'distance': 5.028733313083649,\n",
       "    'valid_length': 6,\n",
       "    'continuous_valid_length': 6},\n",
       "   '913': {'type': 'VEHICLE',\n",
       "    'object_id': '913',\n",
       "    'track_length': 91,\n",
       "    'distance': 21.128061771392822,\n",
       "    'valid_length': 17,\n",
       "    'continuous_valid_length': 17},\n",
       "   '914': {'type': 'VEHICLE',\n",
       "    'object_id': '914',\n",
       "    'track_length': 91,\n",
       "    'distance': 19.261213660240173,\n",
       "    'valid_length': 11,\n",
       "    'continuous_valid_length': 11},\n",
       "   '915': {'type': 'VEHICLE',\n",
       "    'object_id': '915',\n",
       "    'track_length': 91,\n",
       "    'distance': 3.597263425588608,\n",
       "    'valid_length': 7,\n",
       "    'continuous_valid_length': 6},\n",
       "   '916': {'type': 'VEHICLE',\n",
       "    'object_id': '916',\n",
       "    'track_length': 91,\n",
       "    'distance': 6.829868257045746,\n",
       "    'valid_length': 8,\n",
       "    'continuous_valid_length': 8},\n",
       "   '917': {'type': 'VEHICLE',\n",
       "    'object_id': '917',\n",
       "    'track_length': 91,\n",
       "    'distance': 2.040453091263771,\n",
       "    'valid_length': 4,\n",
       "    'continuous_valid_length': 4},\n",
       "   '918': {'type': 'VEHICLE',\n",
       "    'object_id': '918',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 1,\n",
       "    'continuous_valid_length': 1},\n",
       "   '919': {'type': 'VEHICLE',\n",
       "    'object_id': '919',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 1,\n",
       "    'continuous_valid_length': 1},\n",
       "   '924': {'type': 'VEHICLE',\n",
       "    'object_id': '924',\n",
       "    'track_length': 91,\n",
       "    'distance': 0.0,\n",
       "    'valid_length': 5,\n",
       "    'continuous_valid_length': 5},\n",
       "   '1101': {'type': 'VEHICLE',\n",
       "    'object_id': '1101',\n",
       "    'track_length': 91,\n",
       "    'distance': 122.12530386447906,\n",
       "    'valid_length': 91,\n",
       "    'continuous_valid_length': 91}},\n",
       "  'number_summary': {'object': 115,\n",
       "   'dynamic_object_states': 19,\n",
       "   'map_features': 640,\n",
       "   'object_types': {'CYCLIST', 'PEDESTRIAN', 'VEHICLE'},\n",
       "   'object_types_counter': {'PEDESTRIAN': 4, 'CYCLIST': 1, 'VEHICLE': 110},\n",
       "   'dynamic_object_states_types': {'LANE_STATE_ARROW_CAUTION',\n",
       "    'LANE_STATE_ARROW_STOP',\n",
       "    'LANE_STATE_GO',\n",
       "    'LANE_STATE_STOP',\n",
       "    'LANE_STATE_UNKNOWN'},\n",
       "   'dynamic_object_states_counter': {'LANE_STATE_GO': 420,\n",
       "    'LANE_STATE_ARROW_CAUTION': 24,\n",
       "    'LANE_STATE_ARROW_STOP': 402,\n",
       "    'LANE_STATE_UNKNOWN': 63,\n",
       "    'LANE_STATE_STOP': 84}}}}"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dataset_summary"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`scenario_ids` is the list of all scenarios IDs."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['sd_training.tfrecord-00000-of-01000_2a1e44d405a6833f.pkl',\n",
       " 'sd_training.tfrecord-00000-of-01000_c403d5992cab9e0.pkl',\n",
       " 'sd_training.tfrecord-00000-of-01000_8a346109094cd5aa.pkl']"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "scenario_ids"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`mapping` is a dict mapping from scenario IDs to the folder that hosts their files."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'sd_training.tfrecord-00000-of-01000_2a1e44d405a6833f.pkl': '',\n",
       " 'sd_training.tfrecord-00000-of-01000_c403d5992cab9e0.pkl': '',\n",
       " 'sd_training.tfrecord-00000-of-01000_8a346109094cd5aa.pkl': ''}"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mapping"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Read specified scenario\n",
    "\n",
    "`read_scenario` will return the ScenarioNet instance. Please refer to the ScenarioDescription class in MetaDrive for more information."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\u001B[0;31mSignature:\u001B[0m \u001B[0mread_scenario\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0mdataset_path\u001B[0m\u001B[0;34m,\u001B[0m \u001B[0mmapping\u001B[0m\u001B[0;34m,\u001B[0m \u001B[0mscenario_file_name\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n",
       "\u001B[0;31mDocstring:\u001B[0m\n",
       "Read a scenario pkl file and return the Scenario Description instance.\n",
       "\n",
       "Args:\n",
       "    dataset_path: the path to the root folder of your dataset.\n",
       "    mapping: the dict mapping return from read_dataset_summary.\n",
       "    scenario_file_name: the file name to a scenario file, should end with `.pkl`.\n",
       "\n",
       "Returns:\n",
       "    The Scenario Description instance of that scenario.\n",
       "\u001B[0;31mFile:\u001B[0m      ~/scenarionet/scenarionet/common_utils.py\n",
       "\u001B[0;31mType:\u001B[0m      function"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "read_scenario?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "scenario_file_name = scenario_ids[0]\n",
    "\n",
    "scenario = read_scenario(dataset_path=waymo_data, mapping=mapping, scenario_file_name=scenario_file_name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "metadrive.scenario.scenario_description.ScenarioDescription"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(scenario)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['id', 'version', 'length', 'tracks', 'dynamic_map_states', 'map_features', 'metadata'])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "scenario.keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "scenario.sanity_check(scenario)  # Pass check if no error is raised."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "scenario.to_dict()"
   ]
  }
 ],
 "metadata": {
  "colab": {
   "collapsed_sections": [],
   "provenance": []
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
